From 302ec1372c40cd4130101920c2f6c38cad6fc9dc Mon Sep 17 00:00:00 2001 From: Shemig Date: Thu, 15 Jun 2023 23:07:58 +0300 Subject: Fix crash when screen size is 0x0 (#2523) (When booting into laptop clam mode in dell XPS) and also ignore any screen with size 0x0 in the first place Co-authored-by: giladsx --- src/events/Monitors.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/events/Monitors.cpp') diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 23b41667..2360be56 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -57,6 +57,11 @@ void Events::listener_newOutput(wl_listener* listener, void* data) { return; } + if (OUTPUT->width <= 0 || OUTPUT->height <= 0) { + Debug::log(ERR, "New monitor has no dimensions?? Ignoring"); + return; + } + if (g_pCompositor->m_bUnsafeState) { Debug::log(WARN, "Recovering from an unsafe state. May you be lucky."); } -- cgit v1.2.3