mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-07 07:38:19 +02:00
Better fix for xf86CompatOut() when there are no privates
XF86_CRTC_CONFIG_PTR() will derefence privates[-1] in this case.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
(cherry picked from commit 75d7061288)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2146>
This commit is contained in:
parent
ce300ed2bc
commit
fe14f01089
1 changed files with 2 additions and 2 deletions
|
|
@ -837,11 +837,11 @@ extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
|
|||
static _X_INLINE xf86OutputPtr
|
||||
xf86CompatOutput(ScrnInfoPtr pScrn)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
xf86CrtcConfigPtr config;
|
||||
|
||||
if (xf86CrtcConfigPrivateIndex == -1)
|
||||
return NULL;
|
||||
|
||||
config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
if (config->compat_output < 0)
|
||||
return NULL;
|
||||
return config->output[config->compat_output];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue