[Bf-blender-cvs] [7ad0e8300db] blender2.8: Fixed AttributeError when there is no object selected
Sybren A. Stüvel
noreply at git.blender.org
Thu Jun 28 14:21:38 CEST 2018
Commit: 7ad0e8300db27459c0704376f9c73923b2cbc96f
Author: Sybren A. Stüvel
Date: Thu Jun 28 12:53:30 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB7ad0e8300db27459c0704376f9c73923b2cbc96f
Fixed AttributeError when there is no object selected
===================================================================
M release/scripts/startup/bl_ui/properties_physics_field.py
===================================================================
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):
More information about the Bf-blender-cvs
mailing list