mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-04 18:43:17 -05:00
Check if index is valid when resolving child objects
This commit is contained in:
@@ -217,6 +217,11 @@ PdmObjectHandle* PdmReferenceHelper::objectFromReferenceStringList(PdmObjectHand
|
||||
|
||||
if (index > -1)
|
||||
{
|
||||
if (index >= childObjects.size() - 1)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PdmObjectHandle* listObject = childObjects[index];
|
||||
currentObject = listObject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user