Skip to content

Commit 757bf4e

Browse files
committed
Fixing error on using bim.override_mode_set_edit with no active object
Error was: File "\addons\blenderbim\bim\module\geometry\operator.py", line 775, in _execute obj.select_set(True) AttributeError: 'NoneType' object has no attribute 'select_set'
1 parent 7bb57b3 commit 757bf4e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/blenderbim/blenderbim/bim/module/geometry

src/blenderbim/blenderbim/bim/module/geometry/operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ def execute(self, context):
715715
return IfcStore.execute_ifc_operator(self, context)
716716

717717
def _execute(self, context):
718-
objs = context.selected_objects or [context.active_object]
718+
objs = context.selected_objects or ([context.active_object] if context.active_object else [])
719719
active_obj = context.active_object
720720

721721
if context.active_object:

0 commit comments

Comments
 (0)