From f31c6ecdf45d8913ae09f4bd577e33c72ff0ca8c Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 22 Mar 2017 15:29:06 +0300 Subject: [PATCH] Fix fir the issue #2035 : crash on remove of depended Parts --- src/Model/Model_ResultPart.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()); -- 2.39.2