mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Summary Plot : Guard null pointer access
This commit is contained in:
parent
76b992c7ed
commit
c687a5bb5e
@ -485,8 +485,11 @@ void RimSummaryPlot::updateAll()
|
||||
void RimSummaryPlot::updateAllLegendItems()
|
||||
{
|
||||
reattachAllCurves();
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user