# windows: Fix panic when quitting dialogs that do not have a cancel button \(\#40348\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e016c059593bdf405bd53e1ca2ff966923e7a369

Requested commit: e016c059593bdf405bd53e1ca2ff966923e7a369

Commit: e016c059593bdf405bd53e1ca2ff966923e7a369

Tree: 6fea00b4ca36cdc1a5de738bd28c08c421234a04

Author: Lukas Wirth

Committer: GitHub

## Message

```
windows: Fix panic when quitting dialogs that do not have a cancel button (#40348)

`TaskDialogIndirect` may return `IDCANCEL` when the user quits the
dialog via escape or alt+f4, so we need to account for that.

Fixes ZED-25H

Release Notes:

- Fixed panic when hitting escape in dialogs on windows
```

## Parents

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

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