mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 00:49:55 +00:00
delete NULL is a no-op
This commit is contained in:
@@ -413,19 +413,15 @@ CpintPlot::clear_CP_Curves()
|
||||
{
|
||||
// unattach any existing shading curves and reset the list
|
||||
if (allCurves.size()) {
|
||||
foreach (QwtPlotCurve *curve, allCurves) {
|
||||
if (curve)
|
||||
delete curve;
|
||||
}
|
||||
foreach (QwtPlotCurve *curve, allCurves)
|
||||
delete curve;
|
||||
allCurves.clear();
|
||||
}
|
||||
|
||||
// now delete any labels
|
||||
if (allZoneLabels.size()) {
|
||||
foreach (QwtPlotMarker *label, allZoneLabels) {
|
||||
if (label)
|
||||
delete label;
|
||||
}
|
||||
foreach (QwtPlotMarker *label, allZoneLabels)
|
||||
delete label;
|
||||
allZoneLabels.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user