Fix Dropdown creation causing a crash after undoing.
Fix Dropdown creation causing a crash after undoing.
Steps to reproduce:
Create a new "GameObject -> UI -> DropDown TextMeshPro" GameObject
Undo
Current Result: Editor crashes
Expected Result: Game object is undone and editor doesn't crash or throw any errors
Reproduced with: 2023.3.0b4, 2023.3.0b3, 2023.3.0b2, 2023.3.0b1, 2023.2.5f1
Couldn't reproduce with: 2022.3.17f1 (no crash, but the dropdowns created don't disappear)
Prioritise and Follow this issue
Have a workaround or additional info about this issue?