Fix poll error after 3de9915

The error was
Traceback (most recent call last):
  File "\blenderbim\bim\module\model\covering.py", line 64, in poll
    return element.is_a("IfcCovering")
AttributeError: 'NoneType' object has no attribute 'is_a'
This commit is contained in:
Andrej730
2023-10-17 14:12:55 +05:00
parent 8f43854cbf
commit c4474455e9
@@ -61,7 +61,7 @@ class RegenSelectedFlooringObject(bpy.types.Operator, tool.Ifc.Operator):
def poll(cls, context):
active_obj = bpy.context.active_object
element = tool.Ifc.get_entity(active_obj)
return element.is_a("IfcCovering")
return element and element.is_a("IfcCovering")
def _execute(self, context):