:checkered_flag: Don't crash when closing spec window

Focusing the window during the blur event that fires when the
window is closed currently crashes the app on Windows.

Closes #2485