From f70c3f1c0e24d05d0d5f0e6f0a40d48413074499 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 20 Jan 2024 20:44:34 -0600 Subject: [PATCH] Fix crash on monitor index not found in KMS --- src/platform/linux/kmsgrab.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/platform/linux/kmsgrab.cpp b/src/platform/linux/kmsgrab.cpp index 430644e4..c146f866 100644 --- a/src/platform/linux/kmsgrab.cpp +++ b/src/platform/linux/kmsgrab.cpp @@ -727,13 +727,11 @@ namespace platf { } } + BOOST_LOG(error) << "Couldn't find monitor ["sv << monitor_index << ']'; + return -1; + // Neatly break from nested for loop break_loop: - if (monitor != monitor_index) { - BOOST_LOG(error) << "Couldn't find monitor ["sv << monitor_index << ']'; - - return -1; - } // Look for the cursor plane for this CRTC cursor_plane_id = -1;