mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed missing parent = NULL, if parentField() is NULL
This commit is contained in:
@@ -113,9 +113,16 @@ void PdmObjectHandle::firstAncestorOfType(T*& ancestor) const
|
||||
|
||||
// Get next level parent
|
||||
|
||||
PdmObjectHandle* nextParent = NULL;
|
||||
PdmFieldHandle* nextParentField = parent->parentField();
|
||||
if (nextParentField) parent = nextParentField->ownerObject();
|
||||
|
||||
if (nextParentField)
|
||||
{
|
||||
parent = nextParentField->ownerObject();
|
||||
}
|
||||
else
|
||||
{
|
||||
parent = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user