]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
patch for crash
authorasl <asl@opencascade.com>
Fri, 10 Nov 2017 10:48:13 +0000 (13:48 +0300)
committerasl <asl@opencascade.com>
Fri, 10 Nov 2017 12:12:17 +0000 (15:12 +0300)
src/HYDROGUI/HYDROGUI_ProfileDlg.cxx

index 92559c7b6397befb24b75a905286b711cedfce01..239645b4c00491401ca5db19036c2cd8835e68d4 100644 (file)
@@ -313,7 +313,12 @@ void HYDROGUI_ProfileDlg::SwitchToProfile(int theIndex)
         anAISObject->SetWidth(1);
     }
   }
-  (*myProfilesPointer)[0]->getDisplayer()->Update();
+
+  if( myProfilesPointer && 
+      myProfilesPointer->size()>0 && 
+      myProfilesPointer->at(0) && 
+      myProfilesPointer->at(0)->getDisplayer() )
+    myProfilesPointer->at(0)->getDisplayer()->Update();
 }
 
 void HYDROGUI_ProfileDlg::onAddBtnPressed(bool)