From: vsv Date: Tue, 18 Sep 2018 15:32:15 +0000 (+0300) Subject: Issue #2633: Avoid crash on viewer operations when viewer is closed X-Git-Tag: V9_2_0a1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8f02d52c15bcdfa1c65323ba33d0d03f9483dd86;p=modules%2Fshaper.git Issue #2633: Avoid crash on viewer operations when viewer is closed --- diff --git a/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp b/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp index 37148b5a3..58cb99b4c 100644 --- a/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp +++ b/src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp @@ -376,6 +376,8 @@ void SHAPERGUI_SalomeViewer::fitAll() void SHAPERGUI_SalomeViewer::eraseAll() { Handle(AIS_InteractiveContext) aContext = AISContext(); + if (aContext.IsNull()) + return; AIS_ListOfInteractive aList; aContext->DisplayedObjects(aList); AIS_ListIteratorOfListOfInteractive aLIt;