dmx: don't dereference a nullpointer.

This commit is contained in:
Peter Hutterer 2008-06-04 16:05:36 +09:30
parent 75eb635e35
commit 17cd262257

View File

@ -733,7 +733,7 @@ static void _dmxSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
if (pCursor) {
dmxCursorPrivPtr pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen);
if (dmxScreen->curCursor != pCursorPriv->cursor) {
if (pCursorPriv && dmxScreen->curCursor != pCursorPriv->cursor) {
if (dmxScreen->beDisplay)
XDefineCursor(dmxScreen->beDisplay, dmxScreen->scrnWin,
pCursorPriv->cursor);