Fix crash on monitor index not found in KMS

This commit is contained in:
Cameron Gutman
2024-01-20 20:44:34 -06:00
parent cf416f55e1
commit f70c3f1c0e

View File

@@ -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;