From: mpv Date: Fri, 7 Nov 2014 08:08:04 +0000 (+0300) Subject: Issue #244 : do not allow to select null objects (coming from other documents) yet X-Git-Tag: V_0.5~19^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9585dccdd4d56657ced8ef9b25797979ea237f76;p=modules%2Fshaper.git Issue #244 : do not allow to select null objects (coming from other documents) yet --- diff --git a/src/Model/Model_AttributeRefAttr.cpp b/src/Model/Model_AttributeRefAttr.cpp index 85446ef24..4e8a52b0e 100644 --- a/src/Model/Model_AttributeRefAttr.cpp +++ b/src/Model/Model_AttributeRefAttr.cpp @@ -39,7 +39,7 @@ boost::shared_ptr Model_AttributeRefAttr::attr() void Model_AttributeRefAttr::setObject(ObjectPtr theObject) { - if (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject) { + if (theObject && (!myIsInitialized || myID->Get().Length() != 0 || object() != theObject)) { boost::shared_ptr aData = boost::dynamic_pointer_cast( theObject->data()); myRef->Set(aData->label().Father());