mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 09:22:13 -05:00
Summary Plot : Guard null pointer access
This commit is contained in:
1 parent
76b992c7ed
commit
c687a5bb5e
1 file changed
+5
-2
@@ -485,7 +485,10 @@ void RimSummaryPlot::updateAll()
|
||||
void RimSummaryPlot::updateAllLegendItems()
|
||||
{
|
||||
reattachAllCurves();
|
||||
qwtPlot()->updateLegend();
|
||||
if (qwtPlot())
|
||||
{
|
||||
qwtPlot()->updateLegend();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -985,7 +988,7 @@ void RimSummaryPlot::deleteCurves(const std::vector<RimSummaryCurve*>& curves)
|
||||
curveSet->deleteCurve(curve);
|
||||
if (curveSet->curves().empty())
|
||||
{
|
||||
if (curveSet->colorMode() == RimEnsembleCurveSet::BY_ENSEMBLE_PARAM)
|
||||
if (curveSet->colorMode() == RimEnsembleCurveSet::BY_ENSEMBLE_PARAM && qwtPlot())
|
||||
{
|
||||
qwtPlot()->removeEnsembleCurveSetLegend(curveSet);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user