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();
RimSummaryPlot* parentPlot;
firstAncestorOrThisOfTypeAsserted(parentPlot);
if (parentPlot->qwtPlot())
firstAncestorOrThisOfType(parentPlot);
if (parentPlot && parentPlot->qwtPlot())
{
parentPlot->qwtPlot()->removeEnsambleCurveSetLegend(this);
}