From 8f02d52c15bcdfa1c65323ba33d0d03f9483dd86 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 18 Sep 2018 18:32:15 +0300 Subject: [PATCH] Issue #2633: Avoid crash on viewer operations when viewer is closed --- src/SHAPERGUI/SHAPERGUI_SalomeViewer.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.2