diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material_gpencil.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py index cdd39497db5..5fb9d9795e3 100644 --- a/release/scripts/startup/bl_ui/properties_material_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py @@ -157,11 +157,14 @@ class MATERIAL_PT_gpencil_surface(GPMaterialButtonsPanel, Panel): @classmethod def poll(cls, context): ob = context.object + if ob is None: + return False + ma = context.object.active_material if ma is None or ma.grease_pencil is None: return False - return ob and ob.type == 'GPENCIL' + return ob.type == 'GPENCIL' def draw_header_preset(self, context): MATERIAL_PT_gpencil_material_presets.draw_panel_header(self.layout) |