Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-06-28 13:53:30 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-06-28 15:20:11 +0300
commit7ad0e8300db27459c0704376f9c73923b2cbc96f (patch)
tree1d1615364f90022c88ba4f4c6b68816cc7f7ad16
parent98a0bcd4252e952fa5438e9d1b69b0204f8a8746 (diff)
Fixed AttributeError when there is no object selected
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_field.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index 72b5d9f1574..7683c953340 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -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):