Skip to content

Commit

Permalink
Fix crash on monitor index not found in KMS
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Jan 28, 2024
1 parent cf416f5 commit f70c3f1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/platform/linux/kmsgrab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f70c3f1

Please sign in to comment.