From: mpv Date: Mon, 22 Dec 2014 15:22:16 +0000 (+0300) Subject: Issue #285 - crash on invalid reference opened in document X-Git-Tag: V_0.7.0_rc1~56^2~1^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=38340f02884e2f11244db4e15ff05c035fe512f1;p=modules%2Fshaper.git Issue #285 - crash on invalid reference opened in document --- diff --git a/src/Model/Model_AttributeReference.cpp b/src/Model/Model_AttributeReference.cpp index 2b0e15756..43bbabe65 100644 --- a/src/Model/Model_AttributeReference.cpp +++ b/src/Model/Model_AttributeReference.cpp @@ -69,7 +69,9 @@ ObjectPtr Model_AttributeReference::value() owner()->document()); if (aDoc) { TDF_Label aRefLab = myRef->Get(); - return aDoc->object(aRefLab); + if (!aRefLab.IsNull()) { // it may happen with old document, issue #285 + return aDoc->object(aRefLab); + } } } }