From: rnv Date: Thu, 7 Oct 2010 14:28:55 +0000 (+0000) Subject: Fix bug connected with removing of the mesh after closing last viewer window. X-Git-Tag: V5_1_5rc1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1fe6cd3e9f77aee96ea5698bb1af74dc00604040;p=modules%2Fsmesh.git Fix bug connected with removing of the mesh after closing last viewer window. --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index a81fdaec4..1efc41fd2 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1164,7 +1164,7 @@ SalomeApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); SUIT_ViewManager* vm = anApp->activeViewManager(); - int nbSf = vm->getViewsCount(); + int nbSf = vm ? vm->getViewsCount() : 0; SALOME_ListIteratorOfListIO It(selected); @@ -1206,7 +1206,7 @@ std::string anEntry = SO->GetID(); /** Erase graphical object **/ - if(SO->FindAttribute(anAttr, "AttributeIOR")){ + if(SO->FindAttribute(anAttr, "AttributeIOR") && vm ){ QVector aViews = vm->getViews(); for(int i = 0; i < nbSf; i++){ SUIT_ViewWindow *sf = aViews[i];