xserver: Branch 'server-1.5-branch'
Dave Airlie
airlied at kemper.freedesktop.org
Thu Jul 3 01:54:01 PDT 2008
hw/xfree86/modes/xf86Cursors.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit e9f83740e3269a7e73c417b5b6c67668f1cac6e0
Author: Dave Airlie <airlied at redhat.com>
Date: Mon May 19 11:16:08 2008 +1000
cursor: don't dereference NULL pointer is devPrivates not yet set.
This fixes a bug on server recycle with ati zaphod.
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index cb93dc6..fee02df 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -608,13 +608,17 @@ xf86_reload_cursors (ScreenPtr screen)
if (cursor)
{
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
+ void *src = dixLookupPrivate(&cursor->devPrivates, screen);
+#else
+ void *src = cursor->devPriv[screen->myNum];
+#endif
#ifdef ARGB_CURSOR
if (cursor->bits->argb && cursor_info->LoadCursorARGB)
(*cursor_info->LoadCursorARGB) (scrn, cursor);
- else
+ else if (src)
#endif
- (*cursor_info->LoadCursorImage)(cursor_info->pScrn,
- dixLookupPrivate(&cursor->devPrivates, screen));
+ (*cursor_info->LoadCursorImage)(cursor_info->pScrn, src);
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
(*cursor_info->ShowCursor)(cursor_info->pScrn);
More information about the xorg-commit
mailing list