UI:
[blender-staging.git] / release / ui / buttons_data_mesh.py
index 5e4fb203944c9fd1bc7e0142352e9eeefbe77cb5..c103a0f70557cbb2e028ac222620b25aa4da6a2d 100644 (file)
@@ -14,7 +14,7 @@ class DATA_PT_mesh(DataButtonsPanel):
        __label__ = "Mesh"
        
        def poll(self, context):
-               return (context.object.type == 'MESH')
+               return (context.object and context.object.type == 'MESH')
 
        def draw(self, context):
                layout = self.layout
@@ -48,4 +48,4 @@ class DATA_PT_mesh(DataButtonsPanel):
                        
                        layout.itemR(mesh, "texco_mesh")                        
                                        
-bpy.types.register(DATA_PT_mesh)
\ No newline at end of file
+bpy.types.register(DATA_PT_mesh)