From: vsr Date: Wed, 26 Sep 2012 06:16:01 +0000 (+0000) Subject: Fix SIGSEGV on "Display Only" operation in Plot2d viewer X-Git-Tag: V6_6_0a1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4538ebcbb6cb98b74e46f9cdd76e81394d3ca004;p=modules%2Fgui.git Fix SIGSEGV on "Display Only" operation in Plot2d viewer --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 1aeff2adc..f88d4444d 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -318,8 +318,10 @@ void Plot2d_ViewFrame::EraseAll() Plot2d_QwtPlotPicker *picker = myPlot->getPicker(); // Clear points markers list and associations (marker,tooltip) - picker->pMarkers.clear(); // QList - picker->pMarkersToolTip.clear(); // QMap + if ( picker ) { + picker->pMarkers.clear(); // QList + picker->pMarkersToolTip.clear(); // QMap + } // 3)- Erase all QwtPlotCurve associated with the Plot2d_Curve @@ -3021,8 +3023,10 @@ QwtPlotMarker* Plot2d_Plot2d::createMarkerAndTooltip( QwtSymbol symbol, QColor tooltipColor( 253, 245, 230); // OldLace text.setBackgroundBrush( QBrush(tooltipColor)); //, Qt::SolidPattern)); // - picker->pMarkers.append( aPlotMarker); - picker->pMarkersToolTip[ aPlotMarker] = text; + if ( picker ) { + picker->pMarkers.append( aPlotMarker); + picker->pMarkersToolTip[ aPlotMarker] = text; + } return aPlotMarker; }