Guard against negative screen indices in Workspace::xineramaIndexToOutput()
This commit is contained in:
parent
883acb1f58
commit
baaa1db5d1
1 changed files with 1 additions and 1 deletions
|
@ -2582,7 +2582,7 @@ Output *Workspace::xineramaIndexToOutput(int index) const
|
|||
}
|
||||
|
||||
const int infoCount = xcb_xinerama_query_screens_screen_info_length(screens.get());
|
||||
if (index >= infoCount) {
|
||||
if (index < 0 || index >= infoCount) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue