mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xf86: actually set the compat output in the failure case
The previous fix for the previous fix, didn't fully work, If we don't set compat_output we end up doing derferences of arrays with -1, leading to valgrind warnings. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -1848,8 +1848,10 @@ SetCompatOutput(xf86CrtcConfigPtr config)
|
||||
}
|
||||
|
||||
/* All outputs are disconnected, select one to fake */
|
||||
if (!output && config->num_output)
|
||||
output = config->output[0];
|
||||
if (!output && config->num_output) {
|
||||
config->compat_output = 0;
|
||||
output = config->output[config->compat_output];
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user