FIX: "ArgumentNullException: Value cannot be null." when deleting a newly created input action (ISXB-1405) #2129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes https://jira.unity3d.com/browse/ISXB-1405.
The problem ocurred when creating a new action and deleting it before finishing "renaming it". The delete triggers a focus change which calls the event to "rename" the action.
Since at this stage, the action is in "renaming mode" (
m_IsEditing==true) and the action was deleted, the search for that action serialized property would return "null". That case was not being considered before.Testing status & QA
Local testing on macOS trying to replicate the problem.
Creating new actions with a name and removing them also works.
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
I'd only ask to do some more exploratory work around renaming and creating actions in both Project Settings > Input System and a standalone Asset Editor view.
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: