std::shared_ptr<ModelAPI_Document> 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();
std::shared_ptr<ModelAPI_ResultPart> 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<ModelAPI_ResultPart>(data()->owner());