From 645535234afc3dfa5f14f565330fe95a97a35bb6 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 0f87516 --- 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 = {}