# gpui: Fix division by zero when chars/sec = 0 on Wayland \(\#44151\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 2dad46c5c08dbe676c80a39cf9cf0ddac9562b64

Requested commit: 2dad46c5c08dbe676c80a39cf9cf0ddac9562b64

Commit: 2dad46c5c08dbe676c80a39cf9cf0ddac9562b64

Tree: d1a01d60d3a6f9f1fb5271da591ee787b2a39ad2

Author: Rawand Ahmed Shaswar

Committer: GitHub

## Message

```
gpui: Fix division by zero when chars/sec = 0 on Wayland (#44151)

Closes #44148

the existing rate == 0 check inside the timer callback already handles
disabling repeat - it just drops the timer immediately. So the fix
prevents the crash while preserving correct behavior. 

Release Notes:

- Linux (Wayland): Fixed a crash that could occur when
`characters_per_second` was zero
```

## Parents

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

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