From e219e5555af7b05e541b7e290d176495f9456329 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 11 Oct 2017 13:51:38 +0200 Subject: [PATCH] in mult-common feature check if input shapes are valid --- src/Mod/Part/App/FeaturePartCommon.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mod/Part/App/FeaturePartCommon.cpp b/src/Mod/Part/App/FeaturePartCommon.cpp index 78a9d8e8f2..51543a2102 100644 --- a/src/Mod/Part/App/FeaturePartCommon.cpp +++ b/src/Mod/Part/App/FeaturePartCommon.cpp @@ -108,7 +108,13 @@ App::DocumentObjectExecReturn *MultiCommon::execute(void) try { std::vector history; TopoDS_Shape resShape = s.front(); + if (resShape.IsNull()) + throw Base::RuntimeError("Input shape is null"); + for (std::vector::iterator it = s.begin()+1; it != s.end(); ++it) { + if (it->IsNull()) + throw Base::RuntimeError("Input shape is null"); + // Let's call algorithm computing a fuse operation: BRepAlgoAPI_Common mkCommon(resShape, *it); // Let's check if the fusion has been successful