From: mpv Date: Wed, 22 Mar 2017 12:29:06 +0000 (+0300) Subject: Fix fir the issue #2035 : crash on remove of depended Parts X-Git-Tag: V_2.7.0~203 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f31c6ecdf45d8913ae09f4bd577e33c72ff0ca8c;p=modules%2Fshaper.git Fix fir the issue #2035 : crash on remove of depended Parts --- diff --git a/src/Model/Model_ResultPart.cpp b/src/Model/Model_ResultPart.cpp index d30575348..93830df44 100644 --- a/src/Model/Model_ResultPart.cpp +++ b/src/Model/Model_ResultPart.cpp @@ -48,7 +48,7 @@ void Model_ResultPart::initAttributes() std::shared_ptr Model_ResultPart::partDoc() { - if (myTrsf.get()) { + if (myTrsf.get() && baseRef().get()) { // the second condition is to to #2035 return baseRef()->partDoc(); } DocumentPtr aRes = data()->document(DOC_REF())->value(); @@ -99,7 +99,7 @@ void Model_ResultPart::activate() std::shared_ptr Model_ResultPart::original() { - if (myTrsf.get()) { + if (myTrsf.get() && baseRef().get()) { // the second condition is to to #2035 return baseRef()->original(); } return std::dynamic_pointer_cast(data()->owner());