# gpui: Avoid dereferencing null pointer in \`MacWindow::update_ime_position\` \(\#28110\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8b077f0c4167144064f838850a9cc84ff75cbae8)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8b077f0c4167144064f838850a9cc84ff75cbae8

Requested commit: 8b077f0c4167144064f838850a9cc84ff75cbae8

Commit: 8b077f0c4167144064f838850a9cc84ff75cbae8

Tree: b2b71598df6d34c1ba6e635c9473721859f6b994

Author: Finn Evers

Committer: GitHub

## Message

```
gpui: Avoid dereferencing null pointer in `MacWindow::update_ime_position` (#28110)

Seems to be very similar to
https://github.com/zed-industries/zed/pull/28059

Edit: Updated the reproduction-steps as I missed something.

The method without a check currently causes my debug-builds to crash on
the regular if I:
- Run a debug build and open it fullscreen in a dedicated space on my
Mac.
- Work on any of the built-in languages (e.g. remove some content from
any `highlights.scm`)
- Reopen the workspace with the debug-build.
- Crash.

~~We might actually be able to revert the changes made in
https://github.com/zed-industries/zed/pull/21510 and just add the
null-check. Then again, I am not at all sure whether that would work.­~~
See comment below.

Release Notes:

- N/A
```

## Parents

- [288da0f072a16c9e6040e14183110ef4469a73da](https://git.cafe/gitcafe/zed/commit/288da0f072a16c9e6040e14183110ef4469a73da?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8b077f0c4167144064f838850a9cc84ff75cbae8?format=markdown)
