From 7c0aaa5814eefd5672a731234e21e737b5c6dd14 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 1 May 2012 12:20:12 +0200 Subject: [PATCH] Do not override placement if shape is null --- src/Mod/Part/App/PartFeature.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index 508009317..c9483f37c 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -103,9 +103,12 @@ void Feature::onChanged(const App::Property* prop) } else { Base::Placement p; - p.fromMatrix(this->Shape.getShape().getTransform()); - if (p != this->Placement.getValue()) - this->Placement.setValue(p); + // shape must not be null to override the placement + if (!this->Shape.getValue().IsNull()) { + p.fromMatrix(this->Shape.getShape().getTransform()); + if (p != this->Placement.getValue()) + this->Placement.setValue(p); + } } }