]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix bug connected with removing of the mesh after closing last viewer window.
authorrnv <rnv@opencascade.com>
Thu, 7 Oct 2010 14:28:55 +0000 (14:28 +0000)
committerrnv <rnv@opencascade.com>
Thu, 7 Oct 2010 14:28:55 +0000 (14:28 +0000)
src/SMESHGUI/SMESHGUI.cxx

index a81fdaec4152a3657757b63b140c5506621f1844..1efc41fd29c3cf65fb4d847210218ca61b121a10 100644 (file)
 
     SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
     SUIT_ViewManager* vm = anApp->activeViewManager();
-    int nbSf = vm->getViewsCount();
+    int nbSf = vm ? vm->getViewsCount() : 0;
 
     SALOME_ListIteratorOfListIO It(selected);
 
           std::string anEntry = SO->GetID();
 
           /** Erase graphical object **/
-          if(SO->FindAttribute(anAttr, "AttributeIOR")){
+          if(SO->FindAttribute(anAttr, "AttributeIOR") && vm ){
             QVector<SUIT_ViewWindow*> aViews = vm->getViews();
             for(int i = 0; i < nbSf; i++){
               SUIT_ViewWindow *sf = aViews[i];