Fix assert in Ensemble Curveset destructor

This commit is contained in:
Jacob Støren
2018-04-19 09:24:36 +02:00
parent 02049abe78
commit bc05621812

View File

@@ -121,8 +121,8 @@ RimEnsambleCurveSet::~RimEnsambleCurveSet()
m_curves.deleteAllChildObjects(); m_curves.deleteAllChildObjects();
RimSummaryPlot* parentPlot; RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot); firstAncestorOrThisOfType(parentPlot);
if (parentPlot->qwtPlot()) if (parentPlot && parentPlot->qwtPlot())
{ {
parentPlot->qwtPlot()->removeEnsambleCurveSetLegend(this); parentPlot->qwtPlot()->removeEnsambleCurveSetLegend(this);
} }