summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2010-01-25 18:41:20 +0100
committerKeith Packard <keithp@keithp.com>2010-01-27 14:10:48 -0800
commit1e6fd65d0b95260253828678131885a4ec21c594 (patch)
treee98eb30b840d80fdfac1140edb44b6b230ed0aec /hw/xfree86
parent0688dca044f966abc3da667f6d4e79e7cf47f996 (diff)
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 1.7.3.901. It looks like the problem is that gamma_set is called even if that is NULL. [1] https://launchpad.net/bugs/494627 Reviewed-By: Matthias Hopf <mhopf@suse.de> Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/modes/xf86Crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index d015c6a77..573fe96cb 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -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);