Salome HOME
Make same planes cannot be used twice in partition tool
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index ab326f3dfefa513769da7b8ac4bfb90c5d7e36c5..cb56c38795c4e51f8a1c29093dfa6b31a54ee0f2 100755 (executable)
@@ -1436,6 +1436,11 @@ bool XGUI_Workshop::isDeleteFeatureWithReferences(const QObjectPtrList& theList,
   QStringList aPartFeatureNames;
   foreach (ObjectPtr aObj, theList) {
     FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
+    // invalid feature data means that the feature is already removed in model,
+    // we needn't process it. E.g. delete of feature from create operation. The operation abort
+    // will delete the operation
+    if (!aFeature->data()->isValid())
+      continue;
     ResultPtr aFirstResult = aFeature->firstResult();
     std::string aResultGroupName = aFirstResult->groupName();
     if (aResultGroupName == ModelAPI_ResultPart::group())