]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix SIGSEGV on "Display Only" operation in Plot2d viewer
authorvsr <vsr@opencascade.com>
Wed, 26 Sep 2012 06:16:01 +0000 (06:16 +0000)
committervsr <vsr@opencascade.com>
Wed, 26 Sep 2012 06:16:01 +0000 (06:16 +0000)
src/Plot2d/Plot2d_ViewFrame.cxx

index 1aeff2adc7c2e78c2a9ad7a93b517d92ff662bc2..f88d4444d2b247fbd3ad221e1895b7d5bd9ba787 100755 (executable)
@@ -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<QwtPlotMarker*>
-  picker->pMarkersToolTip.clear();  // QMap<QwtPlotMarker*, QwtText>
+  if ( picker ) {
+    picker->pMarkers.clear();         // QList<QwtPlotMarker*>
+    picker->pMarkersToolTip.clear();  // QMap<QwtPlotMarker*, QwtText>
+  }
 
   // 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;
 }