mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1257 Added null pointer guarding based on reports from CppCheck
This commit is contained in:
@@ -190,15 +190,18 @@ void RimGeoMechPropertyFilter::updateReadOnlyStateOfAllFields()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGeoMechPropertyFilter::isPropertyFilterControlled()
|
||||
{
|
||||
bool isPropertyFilterControlled = false;
|
||||
|
||||
RimView* rimView = NULL;
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
CVF_ASSERT(rimView);
|
||||
|
||||
bool isPropertyFilterControlled = false;
|
||||
RimViewController* vc = rimView->viewController();
|
||||
if (vc && vc->isPropertyFilterOveridden())
|
||||
if (rimView)
|
||||
{
|
||||
isPropertyFilterControlled = true;
|
||||
RimViewController* vc = rimView->viewController();
|
||||
if (vc && vc->isPropertyFilterOveridden())
|
||||
{
|
||||
isPropertyFilterControlled = true;
|
||||
}
|
||||
}
|
||||
|
||||
return isPropertyFilterControlled;
|
||||
|
||||
Reference in New Issue
Block a user