Avoid crash if selected item is not a PdmObjectHandle

This commit is contained in:
Rebecca Cox 2018-03-07 15:11:21 +01:00
parent fbdfe90de0
commit 00a0d2b1f6

View File

@ -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);