Guard null pointer access

This commit is contained in:
Magne Sjaastad 2019-03-12 14:31:26 +01:00
parent 147c4f752f
commit 70f16eae27

View File

@ -883,10 +883,13 @@ void RimGridCrossPlotCurveSet::exportFormattedData(RifEclipseDataTableFormatter&
void RimGridCrossPlotCurveSet::triggerPlotNameUpdateAndReplot()
{
RimGridCrossPlot* parent;
this->firstAncestorOrThisOfTypeAsserted(parent);
parent->updateCurveNamesAndPlotTitle();
parent->reattachCurvesToQwtAndReplot();
parent->updateConnectedEditors();
this->firstAncestorOrThisOfType(parent);
if (parent)
{
parent->updateCurveNamesAndPlotTitle();
parent->reattachCurvesToQwtAndReplot();
parent->updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------