summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-05-12 20:05:21 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-05-13 11:17:02 +0930
commit248a1df63430717550adb0e79068d8f9fcfacb0b (patch)
tree40dbb4d8a3248c00430280f41389923ed9babe55
parentfc35d1e3be201e3821413bb2eeb8d43e1e56ba17 (diff)
render: don't dereference cursor if cursor is NULL.
-rw-r--r--render/animcur.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/render/animcur.c b/render/animcur.c
index a87718d12..362607f7a 100644
--- a/render/animcur.c
+++ b/render/animcur.c
@@ -93,7 +93,7 @@ static CursorBits animCursorBits = {
static int AnimCurGeneration;
static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKey;
-#define IsAnimCur(c) ((c)->bits == &animCursorBits)
+#define IsAnimCur(c) ((c) && ((c)->bits == &animCursorBits))
#define GetAnimCur(c) ((AnimCurPtr) ((c) + 1))
#define GetAnimCurScreen(s) ((AnimCurScreenPtr)dixLookupPrivate(&(s)->devPrivates, AnimCurScreenPrivateKey))
#define GetAnimCurScreenIfSet(s) GetAnimCurScreen(s)