rna function api was overwriting useful errors with keyword errors.
[blender.git] / release / ui / buttons_material.py
index 9f1c216c36b668c619814adfd5bdb07d231e0e68..8b58c2b8953daf7ecf5f01d8b5f9c979aef820e0 100644 (file)
@@ -65,8 +65,9 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
                elif mat:
                        split.template_ID(space, "pin_id")
                        split.itemS()
-
-               layout.itemR(mat, "type", expand=True)
+               
+               if mat:
+                       layout.itemR(mat, "type", expand=True)
        
 class MATERIAL_PT_shading(MaterialButtonsPanel):
        __label__ = "Shading"