]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #244 : do not allow to select null objects (coming from other documents) yet
authormpv <mikhail.ponikarov@opencascade.com>
Fri, 7 Nov 2014 08:08:04 +0000 (11:08 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Fri, 7 Nov 2014 08:08:04 +0000 (11:08 +0300)
src/Model/Model_AttributeRefAttr.cpp

index 85446ef248a618c2990e3120ea82de0bb38d2e02..4e8a52b0e195119681a8903e3ca0fcb84968d436 100644 (file)
@@ -39,7 +39,7 @@ boost::shared_ptr<ModelAPI_Attribute> 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<Model_Data> aData = boost::dynamic_pointer_cast<Model_Data>(
         theObject->data());
     myRef->Set(aData->label().Father());