Steps to reproduce:
- Create or open any Project with the Input System Package installed
- Create a new Input Actions asset (Assets > Create > Input Actions)
- Open it and add an Action Map
- Delete the Action Map
Actual results: Two NullReferenceExceptions are thrown. Top of stack:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.InputSystem.Editor.ActionMapsView.<.ctor>b__0_0 (...) (at .../com.unity.inputsystem@21a28c3a6c83/InputSystem/Editor/UITKAssetEditor/Views/ActionMapsView.cs:24)
UnityEngine.InputSystem.Editor.CollectionViewSelectionChangeFilter.OnSelectedIndicesChanged (...) (at .../CollectionViewSelectionChangeFilter.cs:87)
The selection-changed handler fires against the now-empty action map list.
Expected results: Deleting an Action Map (including the last one) leaves an empty list with no exceptions.
Reproducible with versions: 6000.6.0a1, 6000.6.0b3, 6000.7.0a2 (Input System 1.19.0)
Not reproducible with versions: 6000.0.79f1, 6000.3.19f1, 6000.5.0a7 (Input System 1.18.0), 6000.5.3f1 (Input System 1.19.0)
Tested on (OS): Windows 11