Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Avoid dereferencing null pointer in `MacWindow::update_ime_position` (#28110)
Finn Evers8b077f0c4167
diff --git a/crates/gpui/src/platform/mac/window.rs b/crates/gpui/src/platform/mac/window.rsindex 97f8e9f422b..5c04c9505da 100644--- a/crates/gpui/src/platform/mac/window.rs+++ b/crates/gpui/src/platform/mac/window.rs@@ -1161,6 +1161,9 @@ impl PlatformWindow for MacWindow {unsafe {let input_context: id =msg_send![class!(NSTextInputContext), currentInputContext];+ if input_context.is_null() {+ return;+ }let _: () = msg_send![input_context, invalidateCharacterCoordinates];}})