Commit 7dca84f3 authored by Dave Airlie's avatar Dave Airlie

cursor: don't dereference NULL pointer is devPrivates not yet set.

This fixes a bug on server recycle with ati zaphod.
parent 5af5db50
......@@ -613,18 +613,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
#endif
(*cursor_info->LoadCursorImage)(cursor_info->pScrn,
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0)
dixLookupPrivate(&cursor->devPrivates, screen)
#else
cursor->devPriv[screen->myNum]
else if (src)
#endif
);
(*cursor_info->LoadCursorImage)(cursor_info->pScrn, src);
(*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
(*cursor_info->ShowCursor)(cursor_info->pScrn);
......
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