diff --git a/src/Mod/Fem/femtools/femutils.py b/src/Mod/Fem/femtools/femutils.py index d46c144223..6f17d8df8d 100644 --- a/src/Mod/Fem/femtools/femutils.py +++ b/src/Mod/Fem/femtools/femutils.py @@ -285,11 +285,12 @@ def getBoundBoxOfAllDocumentShapes(doc): bb = o.FemMesh.BoundBox except Exception: pass - if bb.isValid(): - if not overalboundbox: - overalboundbox = bb - else: - overalboundbox.add(bb) + if bb: + if bb.isValid(): + if not overalboundbox: + overalboundbox = bb + else: + overalboundbox.add(bb) return overalboundbox