]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #285 - crash on invalid reference opened in document
authormpv <mikhail.ponikarov@opencascade.com>
Mon, 22 Dec 2014 15:22:16 +0000 (18:22 +0300)
committermpv <mikhail.ponikarov@opencascade.com>
Mon, 22 Dec 2014 15:22:16 +0000 (18:22 +0300)
src/Model/Model_AttributeReference.cpp

index 2b0e15756ff84c9766ac0226447aab13a9ad63c5..43bbabe658fff74259890026c982b1302d55670c 100644 (file)
@@ -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);
+        }
       }
     }
   }