UI:
[blender-staging.git] / release / ui / buttons_data_camera.py
index 57abafb95c85e02b7b8b45ff56a2b44bc918c795..db2a1f9db25c60e149d2d8df3c08e5e07d9b3278 100644 (file)
@@ -14,7 +14,7 @@ class DATA_PT_camera(DataButtonsPanel):
        __label__ = "Lens"
        
        def poll(self, context):
-               return (context.object.type == 'CAMERA')
+               return (context.object and context.object.type == 'CAMERA')
 
        def draw(self, context):
                layout = self.layout
@@ -87,4 +87,4 @@ class DATA_PT_camera_display(DataButtonsPanel):
                col.itemR(cam, "draw_size", text="Size")
                
 bpy.types.register(DATA_PT_camera)
-bpy.types.register(DATA_PT_camera_display)
\ No newline at end of file
+bpy.types.register(DATA_PT_camera_display)