mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-22 12:40:23 +01:00
Check nextEnabledOutput()'s return in bestModeForAspect()
In case no enabled outputs, we will reference wrong index of
output array.
(cherry picked from commit 56c615368c)
This commit is contained in:
parent
43e3af9cac
commit
4e6cbd3238
1 changed files with 2 additions and 1 deletions
|
|
@ -1903,7 +1903,8 @@ bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect)
|
|||
int o = -1, p;
|
||||
DisplayModePtr mode = NULL, test = NULL, match = NULL;
|
||||
|
||||
nextEnabledOutput(config, enabled, &o);
|
||||
if (!nextEnabledOutput(config, enabled, &o))
|
||||
return NULL;
|
||||
while ((mode = nextAspectMode(config->output[o], mode, aspect))) {
|
||||
test = mode;
|
||||
for (p = o; nextEnabledOutput(config, enabled, &p); ) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue