diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index 5a9329fa2b..2fec7cb11f 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -1205,7 +1205,7 @@ class ViewProviderComponent: if hasattr(obj,"Material"): if obj.Material: mat = obj.Material - if not mat: + if (not mat) and hasattr(obj.CloneOf.ViewObject,"DiffuseColor"): if obj.ViewObject.DiffuseColor != obj.CloneOf.ViewObject.DiffuseColor: if len(obj.CloneOf.ViewObject.DiffuseColor) > 1: obj.ViewObject.DiffuseColor = obj.CloneOf.ViewObject.DiffuseColor @@ -1259,7 +1259,7 @@ class ViewProviderComponent: # this would now hide all previous windows... Not the desired behaviour anymore. if prop == "DiffuseColor": if hasattr(vobj.Object,"CloneOf"): - if vobj.Object.CloneOf: + if vobj.Object.CloneOf and hasattr(vobj.Object.CloneOf,"DiffuseColor"): if len(vobj.Object.CloneOf.ViewObject.DiffuseColor) > 1: if vobj.DiffuseColor != vobj.Object.CloneOf.ViewObject.DiffuseColor: vobj.DiffuseColor = vobj.Object.CloneOf.ViewObject.DiffuseColor