diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2022-09-22 16:33:24 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2022-09-23 18:31:08 +0000 |
| commit | 50ae277d90c1eea6bb0086c31e004042088f794f (patch) | |
| tree | 5f983017828db85a7b410966b639439b0cf0e470 | |
| parent | render: timer: print/log *total* rendering time (diff) | |
wayland: don’t crash with a division-by-zero when monitor dimensions are negative
Some compositors set the physical dimensions to -1...
| -rw-r--r-- | wayland.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -367,7 +367,7 @@ update_terms_on_monitor(struct monitor *mon) static void output_update_ppi(struct monitor *mon) { - if (mon->dim.mm.width == 0 || mon->dim.mm.height == 0) + if (mon->dim.mm.width <= 0 || mon->dim.mm.height <= 0) return; int x_inches = mon->dim.mm.width * 0.03937008; |
