mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user