Fix crash if APIInspector::RevealParameter is called for hidden object

* There's nothing to expand for hidden objects so make sure we don't crash or
  expand the wrong item.
This commit is contained in:
baldurk
2025-08-15 12:16:41 +01:00
parent bd193696b8
commit fb2c09a4d9
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -93,6 +93,11 @@ void APIInspector::RevealParameter(SDObject *param)
if(current->GetChild(i) == next)
{
current = next;
// revealing a parameter that wasn't added, bail out now
if(i >= parent->childCount() || parent->child((int)i)->tag().value<void *>() != next)
return;
item = parent->child((int)i);
break;
}