mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Check for valid pointer
p4#: 21235
This commit is contained in:
parent
dbc9869f61
commit
e70615d02a
@ -578,7 +578,8 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(const QModelIndex& it
|
||||
CVF_ASSERT(proj);
|
||||
|
||||
caf::PdmUiTreeItem* currentItem = getTreeItemFromIndex(itemIndex);
|
||||
|
||||
if (currentItem)
|
||||
{
|
||||
if (dynamic_cast<RimIdenticalGridCaseGroup*>(currentItem->dataObject().p()) ||
|
||||
dynamic_cast<RimCase*>(currentItem->dataObject().p()))
|
||||
{
|
||||
@ -600,6 +601,7 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(const QModelIndex& it
|
||||
|
||||
return createdObject;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user