quick explode failed if executed with no active object

This commit is contained in:
Campbell Barton 2011-07-01 13:26:20 +00:00
parent 590682bac1
commit dcd8933b95

@ -132,7 +132,7 @@ class QuickExplode(bpy.types.Operator):
fake_context = bpy.context.copy()
obj_act = context.active_object
if obj_act.type != 'MESH':
if obj_act is None or obj_act.type != 'MESH':
self.report({'ERROR'}, "Active object is not a mesh")
return {'CANCELLED'}