From: vsv Date: Mon, 25 Jun 2018 16:02:47 +0000 (+0300) Subject: Prevent a crash with non-presentable edge X-Git-Tag: SHAPER_V9_1_0RC1~157 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6c8f51ea8bec8335779fa5fd2f7aed379224c18;p=modules%2Fshaper.git Prevent a crash with non-presentable edge --- diff --git a/src/PartSet/PartSet_OperationPrs.cpp b/src/PartSet/PartSet_OperationPrs.cpp index 720a0ea9c..50b8cae90 100755 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@ -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 aMsg = std::shared_ptr( + new Events_Message(Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION))); + Events_Loop::loop()->send(aMsg); + return; + } } Set(aComp); if (!aReadyToDisplay) {