summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorHenning Sten <henning.sten@yahoo.com>2008-09-14 17:32:28 +0200
committerJulien Danjou <julien@danjou.info>2008-09-15 11:08:05 +0200
commit40ee0f75753ce30cec9c2cba4346c2eb31d3e8ec (patch)
treed6ba91a5b055f2ce0a5914c4ad6b5bd7ef870b21 /image
parentea2fe131f8fabc14d1c2bb7a978a551da141675d (diff)
return on error to avoid null dereference in assert
Signed-off-by: Julien Danjou <julien@danjou.info>
Diffstat (limited to 'image')
-rw-r--r--image/xcb_image.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/image/xcb_image.c b/image/xcb_image.c
index 10b4b0c..96a1fd2 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -357,8 +357,10 @@ xcb_image_get (xcb_connection_t * conn,
case XCB_IMAGE_FORMAT_Z_PIXMAP:
image = xcb_image_create_native(conn, width, height, format,
imrep->depth, imrep, bytes, data);
- if (!image)
+ if (!image) {
free(imrep);
+ return 0;
+ }
break;
default:
assert(0);