Avoid crash if selected item is not a PdmObjectHandle

This commit is contained in:
Rebecca Cox committed 2018-03-07 15:11:21 +01:00
1 parent fbdfe90de0
commit 00a0d2b1f6
1 file changed
+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);