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>
This commit is contained in:
parent
10de9e8ee3
commit
fa6c701257
|
@ -609,7 +609,7 @@ xf86_reload_cursors (ScreenPtr screen)
|
||||||
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
|
cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
|
||||||
xf86CursorScreenKey);
|
xf86CursorScreenKey);
|
||||||
/* return if HW cursor is inactive, to avoid displaying two cursors */
|
/* 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;
|
return;
|
||||||
|
|
||||||
scrn = xf86Screens[screen->myNum];
|
scrn = xf86Screens[screen->myNum];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user