summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cursor/xcursor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cursor/xcursor.c b/cursor/xcursor.c
index 7a9662a..f9d9669 100644
--- a/cursor/xcursor.c
+++ b/cursor/xcursor.c
@@ -488,6 +488,8 @@ _XcursorReadImage (XcursorFile *file,
/* Create the image and initialize it */
image = XcursorImageCreate (head.width, head.height);
+ if (image == NULL)
+ return NULL;
if (chunkHeader.version < image->version)
image->version = chunkHeader.version;
image->size = chunkHeader.subtype;