How to reproduce:
1. Open the attached project "ReproductionProject"
2. In the Project window, go to Assets -> Prefabs
3. Select the "Coin" prefab
4. In the Inspector, go to the Prefab Variant Menu near the "Open" button
5. Close the menu by clicking the same button that was used for opening it
6. Observe the Console
Expected results: There are no errors thrown
Actual results: "NullReferenceException: Object reference not set to an instance of an object" is thrown
Reproducible with: 2022.3.56f1, 6000.0.34f1, 6000.1.0b2
Reproducible on: macOS Sequoia 15.1 (M1)
Not reproducible on: No other environment tested
Full error:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.PrefabFamilyPopup.CalculateOverrideCountsTimeSliced () (at /Users/bokken/build/output/unity/unity/Editor/Mono/Prefabs/PrefabFamilyPopup.cs:242)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:384)