]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Minor fix: avoid crash in clearPrs() function, if view manager has been reset to 0
authorvsr <vsr@opencascade.com>
Wed, 25 Aug 2010 10:25:28 +0000 (10:25 +0000)
committervsr <vsr@opencascade.com>
Wed, 25 Aug 2010 10:25:28 +0000 (10:25 +0000)
src/Plot2d/Plot2d_ViewModel.cxx

index 2e912da1ae822ebb913141deadc952b812cdbf28..a36346e0b2e6a31f2c47fa6efabd1669132a618d 100755 (executable)
@@ -121,7 +121,9 @@ void Plot2d_Viewer::update()
 void Plot2d_Viewer::clearPrs()
 {
   SUIT_ViewManager* aMgr = getViewManager();
-  QVector<SUIT_ViewWindow*> aViews = aMgr->getViews();
+  QVector<SUIT_ViewWindow*> aViews;
+  if ( aMgr )
+    aViews = aMgr->getViews();
   unsigned int aSize = aViews.size();
   for (uint i = 0; i < aSize; i++) {
     Plot2d_ViewWindow* aView = (Plot2d_ViewWindow*)aViews[i];