diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 674ced35f2..dd19832eda 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -4042,9 +4042,11 @@ TopoShape &TopoShape::makeFace(const std::vector &shapes, const char return *this; } -TopoShape &TopoShape::makeRefine(const TopoShape &shape, const char *op, bool no_fail) { +TopoShape &TopoShape::makeRefine(const TopoShape &shape, const char *op, bool no_fail) +{ (void)op; _Shape.Nullify(); + if(shape.isNull()) { if(!no_fail) HANDLE_NULL_SHAPE; diff --git a/src/Mod/Part/App/TopoShape.h b/src/Mod/Part/App/TopoShape.h index 876b221e0e..c5fa8e6e35 100644 --- a/src/Mod/Part/App/TopoShape.h +++ b/src/Mod/Part/App/TopoShape.h @@ -1072,9 +1072,11 @@ private: void Nullify() { - _owner->resetElementMap(); - _owner->_cache.reset(); - _owner->_parentCache.reset(); + if (!this->IsNull()) { + _owner->resetElementMap(); + _owner->_cache.reset(); + _owner->_parentCache.reset(); + } } const TopLoc_Location& Location() const