mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 04:00:57 -06:00
Avoid crash if selected item is not a PdmObjectHandle
This commit is contained in:
parent
fbdfe90de0
commit
00a0d2b1f6
@ -222,6 +222,11 @@ RimCase* commonGridCase(std::vector<caf::PdmUiItem*> selectedItems)
|
||||
for (caf::PdmUiItem* item : selectedItems)
|
||||
{
|
||||
caf::PdmObjectHandle* obj = dynamic_cast<caf::PdmObjectHandle*>(item);
|
||||
if (!obj)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
RimCase* itemCase = nullptr;
|
||||
obj->firstAncestorOrThisOfType(itemCase);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user