gpui: Avoid dereferencing null pointer in `MacWindow::active_window` (#28059)

This PR adds a check to avoid dereferencing a null pointer in
`MacWindow::active_window`.

Rust 1.86 now has a [debug assertion for dereferencing null
pointers](https://blog.rust-lang.org/2025/04/03/Rust-1.86.0.html#debug-assertions-that-pointers-are-non-null-when-required-for-soundness),
which means that losing focus of the window would cause a null pointer
to be dereferenced and panic.

Release Notes:

- N/A
ec40e2d85cMarshall Bowers committed on 4/3/2025, 10:47:13 PM· committed by GitHubparent819bb8f
1 file changedLine totals unavailable