UI:
[blender-staging.git] / release / ui / buttons_data_lattice.py
index 9382ee3525cb9d5eb57469ef748a367f7b2fa7b1..ad9b1b518b8eafea8c96e1d200ce020e29883be1 100644 (file)
@@ -14,7 +14,7 @@ class DATA_PT_lattice(DataButtonsPanel):
        __label__ = "Lattice"
        
        def poll(self, context):
-               return (context.object.type == 'LATTICE')
+               return (context.object and context.object.type == 'LATTICE')
 
        def draw(self, context):
                layout = self.layout
@@ -51,4 +51,4 @@ class DATA_PT_lattice(DataButtonsPanel):
                        row.itemR(lat, "outside")
                        row.itemR(lat, "shape_keys")
 
-bpy.types.register(DATA_PT_lattice)
\ No newline at end of file
+bpy.types.register(DATA_PT_lattice)