Commit 1e6fd65d authored by Michael Vogt's avatar Michael Vogt Committed by Keith Packard

xfree86/modes: only call gamma_set if its non NULL

I ran accross a crash with xf86-video-nv-2.1.15 [1] and xserver It looks like the problem is that gamma_set is called even
if that is NULL.

[1] Matthias Hopf's avatarMatthias Hopf <>
Signed-off-by: Julien Cristau's avatarJulien Cristau <>
Signed-off-by: Keith Packard's avatarKeith Packard <>
parent 0688dca0
......@@ -354,7 +354,7 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
/* Only upload when needed, to avoid unneeded delays. */
if (!crtc->active)
if (!crtc->active && crtc->funcs->gamma_set)
crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
crtc->gamma_blue, crtc->gamma_size);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment