mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-04 13:16:56 -06:00
Avoid crash if selected item is not a PdmObjectHandle
This commit is contained in:
1 parent
fbdfe90de0
commit
00a0d2b1f6
1 file changed
+5
+5
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user