How to reproduce:
1. Create a new project
2. Click Window -> Analysis -> Profiler (Standalone Process)
3. Wait for the process to finish opening the Profiler and then close the Profiler Window
Expected results: The Profiler's process is closed without any issues
Actual results: The Profiler's process crashes when trying to close the window
Reproducible with: 2021.2.0b6, 2022.1.0a1, 2022.1.0a3
Not reproducible with: 2020.3.14f1, 2021.1.16f1, 2021.2.0b5, 2022.1.0a4, 2022.1.0a6
Could not test with: 2019.4.29f1 (Standalone Profiler process was not available)
Reproducible on - macOS 11.4 and Windows10 (Tested with 2021.2.0b2 - didn't reproduce the issue; 2022.1.0a3 - reproduced the issue)
Notes:
1. The crash seems to occur only for the Profiler's separate process. So while a crash window is thrown, the Editor can still be used afterward