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,7 +485,10 @@ void RimSummaryPlot::updateAll()
|
|||||||
void RimSummaryPlot::updateAllLegendItems()
|
void RimSummaryPlot::updateAllLegendItems()
|
||||||
{
|
{
|
||||||
reattachAllCurves();
|
reattachAllCurves();
|
||||||
qwtPlot()->updateLegend();
|
if (qwtPlot())
|
||||||
|
{
|
||||||
|
qwtPlot()->updateLegend();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -985,7 +988,7 @@ void RimSummaryPlot::deleteCurves(const std::vector<RimSummaryCurve*>& curves)
|
|||||||
curveSet->deleteCurve(curve);
|
curveSet->deleteCurve(curve);
|
||||||
if (curveSet->curves().empty())
|
if (curveSet->curves().empty())
|
||||||
{
|
{
|
||||||
if (curveSet->colorMode() == RimEnsembleCurveSet::BY_ENSEMBLE_PARAM)
|
if (curveSet->colorMode() == RimEnsembleCurveSet::BY_ENSEMBLE_PARAM && qwtPlot())
|
||||||
{
|
{
|
||||||
qwtPlot()->removeEnsembleCurveSetLegend(curveSet);
|
qwtPlot()->removeEnsembleCurveSetLegend(curveSet);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user