Fix crash in select intervals in PfPvPlot

.. we delete the curves after they are detached which
   causes a SEGV as they are already deleted.
This commit is contained in:
Mark Liversedge
2013-12-16 18:16:15 +00:00
parent 80cb8f464d
commit 6bfb1ba701

View File

@@ -245,7 +245,7 @@ PfPvPlot::refreshZoneItems()
while (i.hasNext()) {
QwtPlotCurve *curve = i.next();
curve->detach();
delete curve;
//delete curve;
}
}
zoneCurves.clear();
@@ -362,7 +362,7 @@ PfPvPlot::setData(RideItem *_rideItem)
while (i.hasNext()) {
QwtPlotCurve *curve = i.next();
curve->detach();
delete curve;
//delete curve;
}
}
intervalCurves.clear();
@@ -461,7 +461,7 @@ PfPvPlot::showIntervals(RideItem *_rideItem)
while (i.hasNext()) {
QwtPlotCurve *curve = i.next();
curve->detach();
delete curve;
//delete curve;
}
}
intervalCurves.clear();