UI:
[blender-staging.git] / release / ui / buttons_data_text.py
index d6f6feaa389cac799d07b6493bcea156b52a2fdf..bce16e78a40a59d834834f0089523c5e88268b62 100644 (file)
@@ -7,7 +7,7 @@ class DataButtonsPanel(bpy.types.Panel):
        __context__ = "data"
        
        def poll(self, context):
        __context__ = "data"
        
        def poll(self, context):
-               return (context.object.type == 'TEXT' and context.curve)
+               return (context.object and context.object.type == 'TEXT' and context.curve)
                
 class DATA_PT_shape_text(DataButtonsPanel):
        __idname__ = "DATA_PT_shape_text"
                
 class DATA_PT_shape_text(DataButtonsPanel):
        __idname__ = "DATA_PT_shape_text"
@@ -15,7 +15,7 @@ class DATA_PT_shape_text(DataButtonsPanel):
        
        def poll(self, context):
                ob = context.object
        
        def poll(self, context):
                ob = context.object
-               return (context.object.type == 'TEXT')
+               return (context.object and context.object.type == 'TEXT')
 
        def draw(self, context):
                layout = self.layout
 
        def draw(self, context):
                layout = self.layout