# gpui: Fix crash when starting Zed on macOS during texture creation \(\#36382\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7dc4adbd4027b9b3ba80db589f93be25dcaaa64d

Requested commit: 7dc4adbd4027b9b3ba80db589f93be25dcaaa64d

Commit: 7dc4adbd4027b9b3ba80db589f93be25dcaaa64d

Tree: 2a0dba5e29226fb7f385b3088740a066f5f8574f

Author: Smit Barmase

Committer: GitHub

## Message

```
gpui: Fix crash when starting Zed on macOS during texture creation (#36382)

Closes #36229

Fix zero-sized texture creation that triggers a SIGABRT in the Metal
renderer. Not sure why this happens yet, but it likely occurs when
`native_window.contentView()` returns a zero `NSSize` during initial
window creation, before the view size is computed.

Release Notes:

- Fixed a rare startup crash on macOS.
```

## Parents

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

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