From 9585dccdd4d56657ced8ef9b25797979ea237f76 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 7 Nov 2014 11:08:04 +0300 Subject: [PATCH] Issue #244 : do not allow to select null objects (coming from other documents) yet --- src/Model/Model_AttributeRefAttr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); -- 2.39.2