]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Prevent a crash with non-presentable edge
authorvsv <vsv@opencascade.com>
Mon, 25 Jun 2018 16:02:47 +0000 (19:02 +0300)
committervsv <vsv@opencascade.com>
Mon, 25 Jun 2018 16:02:47 +0000 (19:02 +0300)
src/PartSet/PartSet_OperationPrs.cpp

index 720a0ea9c763a169456ffc8677395a8e3a22c595..50b8cae9014febae492b8ddbc518854540ac6a0c 100755 (executable)
@@ -141,7 +141,17 @@ void PartSet_OperationPrs::Compute(
         setWidth(aDrawer, aWidth);
       }
     }
-    StdPrs_WFShape::Add(thePresentation, aShape, aDrawer);
+    try {
+      StdPrs_WFShape::Add(thePresentation, aShape, aDrawer);
+    }
+    catch (...) {
+      Events_InfoMessage("PartSet_OperationPrs",
+        "An empty AIS presentation: PartSet_OperationPrs").send();
+      std::shared_ptr<Events_Message> aMsg = std::shared_ptr<Events_Message>(
+        new Events_Message(Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION)));
+      Events_Loop::loop()->send(aMsg);
+      return;
+    }
   }
   Set(aComp);
   if (!aReadyToDisplay) {