#955 Guard nullptr access

This commit is contained in:
Magne Sjaastad 2018-05-14 09:53:26 +02:00
parent 6fcc91cdcd
commit 94ab7b7923

View File

@ -52,7 +52,10 @@ void RicViewZoomAllFeature::onActionTriggered(bool isChecked)
if (dynamic_cast<RiuMainWindow*>(topLevelWidget))
{
RimViewWindow* viewWindow = RiaApplication::instance()->activeReservoirView();
viewWindow->zoomAll();
if (viewWindow)
{
viewWindow->zoomAll();
}
}
else if (dynamic_cast<RiuPlotMainWindow*>(topLevelWidget))
{