UI:
[blender-staging.git] / release / ui / buttons_data_armature.py
index 1086e77c3f79ac7fbbc47b952fff246476eab4f7..c536f6bb87d481fd69ae81a125bdf3c0bd593cb2 100644 (file)
@@ -14,7 +14,7 @@ class DATA_PT_skeleton(DataButtonsPanel):
        __label__ = "Skeleton"
        
        def poll(self, context):
        __label__ = "Skeleton"
        
        def poll(self, context):
-               return (context.object.type == 'ARMATURE' or context.armature)
+               return ((context.object and context.object.type == 'ARMATURE') or context.armature)
 
        def draw(self, context):
                layout = self.layout
 
        def draw(self, context):
                layout = self.layout
@@ -127,4 +127,4 @@ class DATA_PT_ghost(DataButtonsPanel):
 bpy.types.register(DATA_PT_skeleton)
 bpy.types.register(DATA_PT_display)
 bpy.types.register(DATA_PT_paths)
 bpy.types.register(DATA_PT_skeleton)
 bpy.types.register(DATA_PT_display)
 bpy.types.register(DATA_PT_paths)
-bpy.types.register(DATA_PT_ghost)
\ No newline at end of file
+bpy.types.register(DATA_PT_ghost)