#1257 Added null pointer guarding based on reports from CppCheck

This commit is contained in:
Magne Sjaastad
2017-02-24 16:00:56 +01:00
parent 85228ee39c
commit a29f6abc32
14 changed files with 81 additions and 50 deletions
@@ -144,11 +144,14 @@ void RimGeoMechPropertyFilterCollection::updateIconState()
RimGeoMechView* view = NULL;
this->firstAncestorOrThisOfType(view);
RimViewController* viewController = view->viewController();
if (viewController && ( viewController->isPropertyFilterOveridden()
|| viewController->isVisibleCellsOveridden()))
if (view)
{
activeIcon = false;
RimViewController* viewController = view->viewController();
if (viewController && ( viewController->isPropertyFilterOveridden()
|| viewController->isVisibleCellsOveridden()))
{
activeIcon = false;
}
}
if (!isActive)