From 91c7d8bfc9ad965a17f79a5b17298d9f997ba686 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:27:47 +0200 Subject: [PATCH] Draft: _get_shapes in shape2dview.py did not handle null shapes (#14646) Null shapes do not have a ShapeType (strange IMO). The function did not take that into account. Forum topic: https://forum.freecad.org/viewtopic.php?t=88397 --- src/Mod/Draft/draftobjects/shape2dview.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Draft/draftobjects/shape2dview.py b/src/Mod/Draft/draftobjects/shape2dview.py index 8b7c9a363d..faed945a8c 100644 --- a/src/Mod/Draft/draftobjects/shape2dview.py +++ b/src/Mod/Draft/draftobjects/shape2dview.py @@ -198,6 +198,8 @@ class Shape2DView(DraftObject): def _get_shapes(self, shape, onlysolids=False): if onlysolids: return shape.Solids + if shape.isNull(): + return [] if shape.ShapeType == "Compound": return shape.SubShapes return [shape.copy()]