From 396fd5520fec049176583ac1aa5a0b21d41a9d22 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 29 Jan 2023 15:15:00 +1100 Subject: [PATCH] Fix #2349. Be more defensive on invalid smart annotations. --- src/ifcopenshell-python/ifcopenshell/util/selector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/util/selector.py b/src/ifcopenshell-python/ifcopenshell/util/selector.py index fc6672f2d6..3f1e01548c 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/selector.py +++ b/src/ifcopenshell-python/ifcopenshell/util/selector.py @@ -238,6 +238,8 @@ class Selector: if key in info and info[key] == value: element = material element = material_definition + if not element: + return None except: return elif "." in key and key.split(".")[0] == "container":