From: vsr Date: Wed, 25 Aug 2010 10:25:28 +0000 (+0000) Subject: Minor fix: avoid crash in clearPrs() function, if view manager has been reset to 0 X-Git-Tag: end_translate_resources_09Jul10~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d8615b096cd751ff231fb3dc96b578a5b72dc3f;p=modules%2Fgui.git Minor fix: avoid crash in clearPrs() function, if view manager has been reset to 0 --- diff --git a/src/Plot2d/Plot2d_ViewModel.cxx b/src/Plot2d/Plot2d_ViewModel.cxx index 2e912da1a..a36346e0b 100755 --- a/src/Plot2d/Plot2d_ViewModel.cxx +++ b/src/Plot2d/Plot2d_ViewModel.cxx @@ -121,7 +121,9 @@ void Plot2d_Viewer::update() void Plot2d_Viewer::clearPrs() { SUIT_ViewManager* aMgr = getViewManager(); - QVector aViews = aMgr->getViews(); + QVector 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];