Salome HOME
An additiona lcondition to avoid crash in some Abort cases
authormpv <mpv@opencascade.com>
Mon, 18 Feb 2019 08:58:27 +0000 (11:58 +0300)
committermpv <mpv@opencascade.com>
Mon, 18 Feb 2019 08:58:27 +0000 (11:58 +0300)
src/Model/Model_AttributeSelection.cpp

index 00736a73ece411591afd7cc6d08e054c99c310f7..129eb2bbbcc42ca5c73d7ecc14121933858cd324 100644 (file)
@@ -1306,7 +1306,7 @@ void Model_AttributeSelection::updateInHistory()
               continue;
 
             FeaturePtr aRefFeat = std::dynamic_pointer_cast<ModelAPI_Feature>((*aRef)->owner());
-            if (aRefFeat.get() && aRefFeat != owner()) {
+            if (aRefFeat.get() && aRefFeat != owner() && aRefFeat->firstResult().get()) {
               FeaturePtr aThisFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(owner());
               if (!aDoc->isLaterByDep(aRefFeat, aThisFeature)) { // found better feature
                 aFoundNewContext = true;