Steps to reproduce:
- Open the attached project
- Observe that an open Search window is presenting results for the project's assets
- In the project window, create a new Mono Behaviour script
- Observe that search results are updated, and no errors are thrown
- Delete the created Mono Behaviour script
- Observe the console window
Actual results: NullReferenceException is thrown
Expected results: No errors or warnings are thrown
Reproducible with versions: 6000.5.0a7, 6000.5.0a8
Not reproducible with versions: 2022.3.74f1, 6000.0.70f1, 6000.3.11f1, 6000.4.0b12, 6000.5.0a6
Tested on (OS): Windows 11, macOS 26.3.1
Notes:
- Also reproducible by adding/removing any package using a Package Manager
Full error message:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Search.SearchWindow.Update () (at /Users/bokken/build/output/unity/unity/Modules/QuickSearch/Editor/UITK/SearchWindow.cs:167)
UnityEditor.HostView.SendUpdate () (at /Users/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:712)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:403)