From f6c8f51ea8bec8335779fa5fd2f7aed379224c18 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 25 Jun 2018 19:02:47 +0300 Subject: [PATCH] Prevent a crash with non-presentable edge --- src/PartSet/PartSet_OperationPrs.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) { -- 2.39.2