From 0749c9df34403581488b38eb7b3d5fdf84823b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20S=C3=A1lyi?= Date: Mon, 30 Sep 2024 20:13:20 +0200 Subject: [PATCH] Add missing check if updated output has a positive resolution --- src/wayland.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wayland.rs b/src/wayland.rs index 70982e9..aaebcf1 100644 --- a/src/wayland.rs +++ b/src/wayland.rs @@ -360,6 +360,14 @@ logical size: {}x{}", ); return; }; + + if !width.is_positive() || !height.is_positive() { + error!( + "Updated output '{}' has non-positive resolution: {} x {}, skipping", + output_name, width, height + ); + return; + } let integer_scale_factor = info.scale_factor;