# Windows: fix crash with unhandled window \(\#9164\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a04932c4eb1d451692e21cf22daa59044c846bc2

Requested commit: a04932c4eb1d451692e21cf22daa59044c846bc2

Commit: a04932c4eb1d451692e21cf22daa59044c846bc2

Tree: 5c0675ef3c1b285c01d983f27460bf4c609ddb31

Author: 白山風露

Committer: GitHub

## Message

```
Windows: fix crash with unhandled window (#9164)

On Windows, some windows may be created that are not managed by the
application.
For example, the Japanese IME creates pop-ups like this one.

<img width="325" alt="image"
src="https://github.com/zed-industries/zed/assets/6465609/503aaa0a-7568-485a-a138-e689ae67001c">

The internal data associated with such a window is different from
`WindowsWindowInner` and will crash if referenced.
Therefore, before calling `try_get_window_inner`, it checks if it is an
owned window.


Release Notes:

- N/A
```

## Parents

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

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