xcursor: don't proceed if XcursorImageCreate failed

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This commit is contained in:
U. Artie Eoff 2014-01-10 14:43:48 -08:00 committed by Kristian Høgsberg
parent d6c6f2977d
commit 02952d040c

View File

@ -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;