Skip to content

Commit ba107f9

Browse files
committed
check if prev selection is set before getting value
1 parent 89d7e61 commit ba107f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/FbxExporters/Editor/FbxExportSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@ public static GUIContent[] GetDCCOptions(){
599599
instance.dccOptionNames = new List<string> ();
600600
FindDCCInstalls ();
601601
}
602-
603-
// store the selected app
604-
var prevSelection = instance.dccOptionPaths[instance.selectedDCCApp];
602+
// store the selected app if any
603+
string prevSelection = instance.dccOptionPaths.Count > 0 && instance.selectedDCCApp >=0 ?
604+
instance.dccOptionPaths[instance.selectedDCCApp] : null;
605605

606606
// remove options that no longer exist
607607
List<string> pathsToDelete = new List<string>();

0 commit comments

Comments
 (0)