summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2010-03-01 02:11:36 +0100
committerJulien Cristau <jcristau@debian.org>2010-06-03 16:53:54 +0200
commitf44ebbd3d52fa0dfdc51f6635721592b70affb6e (patch)
tree13a4719dd6d737d647243dd1b1405dae3fa6569f
parentd2f29b85d14fa56f22302854b585d04124b0db92 (diff)
Fix null pointer dereference in xf86_reload_cursors().
Upon resume, X may try to dereference a null pointer, which has been reported in Debian bug #507916 (http://bugs.debian.org/507916). Jim Paris came up with a patch which solves the problem for him. Here's a (hopefully) fixed version of his patch (without the typo). Cc: Jim Paris <jim@jtan.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-By: Matthias Hopf <mhopf@suse.de> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit fa6c7012572093a82c9389682977efff85590719)
-rw-r--r--hw/xfree86/modes/xf86Cursors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 385848b7a..d6e747fb0 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -611,7 +611,7 @@ xf86_reload_cursors (ScreenPtr screen)
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
xf86CursorScreenKey);
/* return if HW cursor is inactive, to avoid displaying two cursors */
- if (!cursor_screen_priv->isUp)
+ if (!cursor_screen_priv || !cursor_screen_priv->isUp)
return;
scrn = xf86Screens[screen->myNum];