forked from bartvdbraak/blender
Fixed AttributeError when there is no object selected
This commit is contained in:
parent
98a0bcd425
commit
7ad0e8300d
@ -43,6 +43,8 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
if not ob:
|
||||
return False
|
||||
return (context.engine in cls.COMPAT_ENGINES) and (ob.field) and (ob.field.type != 'NONE')
|
||||
|
||||
def draw(self, context):
|
||||
|
Loading…
Reference in New Issue
Block a user