From 94905acf0536ccad9173d6fd4857a4e9eb2d4a4b Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Mon, 9 Nov 2020 19:29:55 +0100 Subject: [PATCH] Material: fix open material editor with empty material, regression was added with commit 66d2688 --- src/Mod/Material/MaterialEditor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Material/MaterialEditor.py b/src/Mod/Material/MaterialEditor.py index 019104bcde..77c5c1d317 100644 --- a/src/Mod/Material/MaterialEditor.py +++ b/src/Mod/Material/MaterialEditor.py @@ -414,6 +414,8 @@ class MaterialEditor: "returns a dictionary from the contents of the editor." model = self.widget.treeView.model() + if model is None: + return {} root = model.invisibleRootItem() d = {}