Skip to content

Commit b08c584

Browse files
author
David Kline
authored
Merge pull request #8803 from prefrontalcortex/sanitize-dataprovider-array-access
Sanitize data provider array access
2 parents 58bb369 + 1e3ebb4 commit b08c584

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Assets/MRTK/Core/Inspectors/Profiles/DataProviderAccessServiceInspector.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ protected bool RenderDataProviderEntry(int index, GUIContent removeContent, Syst
167167
{
168168
using (new EditorGUILayout.HorizontalScope())
169169
{
170+
if (index < 0 || index >= providerFoldouts.Count) index = 0;
170171
providerFoldouts[index] = EditorGUILayout.Foldout(providerFoldouts[index], providerProperties.componentName.stringValue, true);
171172

172173
if (GUILayout.Button(removeContent, EditorStyles.miniButtonRight, GUILayout.Width(24f)))

0 commit comments

Comments
 (0)