]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2633: Avoid crash on viewer operations when viewer is closed
authorvsv <vsv@opencascade.com>
Tue, 18 Sep 2018 15:32:15 +0000 (18:32 +0300)
committervsv <vsv@opencascade.com>
Tue, 18 Sep 2018 15:32:15 +0000 (18:32 +0300)
src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp

index 37148b5a3b9025ec68fcd0aa1d7d04a55c093ddf..58cb99b4ccb86062964ea8fd29032f541d3de0e7 100644 (file)
@@ -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;