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 <gilad@spectalix.com>
This commit is contained in:
Shemig 2023-06-15 23:07:58 +03:00 committed by GitHub
parent d768226de9
commit 302ec1372c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -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.");
}