Skip to content

Commit 3d95420

Browse files
committed
uni-39246: fix exception in specific case
If there were more things to destroy than options to choose we threw an exception, because apparently an array changed its indexing type during development. Fixed by setting the array bounds correctly.
1 parent bd99351 commit 3d95420

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/FbxExporters/Editor/ManualUpdateEditorWindow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public void Init(FbxPrefabAutoUpdater.FbxPrefabUtility fbxPrefabUtility, FbxPref
3333
m_nodeNameToSuggest.AddRange(m_nodesToCreate);
3434
m_nodeNameToSuggest.AddRange(m_nodesToRename);
3535

36-
// Add extra 1 for the [Delete] option
37-
selectedNodesToDestroy = new int[m_nodeNameToSuggest.Count + 1];
38-
selectedNodesToRename = new int[m_nodeNameToSuggest.Count + 1];
36+
// Keep track of the selected combo option in each type
37+
selectedNodesToDestroy = new int[m_nodesToDestroy.Count];
38+
selectedNodesToRename = new int[m_nodesToRename.Count];
3939

4040
// Default option for nodes to rename. Shows the current name mapping
4141
for (int i = 0; i < m_nodesToRename.Count; i++)

0 commit comments

Comments
 (0)