Skip to content

Commit

Permalink
Fix CurveColor SEGV
Browse files Browse the repository at this point in the history
.. for plot items with no scale widget
  • Loading branch information
liversedge committed Aug 31, 2015
1 parent db4081a commit 601b720
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AllPlot.h
Expand Up @@ -179,7 +179,7 @@ class CurveColors : public QObject
static_cast<QwtPlotSeriesItem*>(item)->isVisible());

QwtScaleWidget *x = plot->axisWidget(static_cast<QwtPlotSeriesItem*>(item)->yAxis());
colors.insert(x, x->palette());
if (x) colors.insert(x, x->palette());

QwtPlotCurve *curve = static_cast<QwtPlotCurve*>(item);

Expand All @@ -197,7 +197,7 @@ class CurveColors : public QObject
static_cast<QwtPlotSeriesItem*>(item)->isVisible());

QwtScaleWidget *x = plot->axisWidget(static_cast<QwtPlotSeriesItem*>(item)->yAxis());
colors.insert(x, x->palette());
if (x) colors.insert(x, x->palette());

}
}
Expand Down

0 comments on commit 601b720

Please sign in to comment.