summaryrefslogtreecommitdiff
path: root/image/xcb_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/xcb_image.c')
-rw-r--r--image/xcb_image.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/image/xcb_image.c b/image/xcb_image.c
index 17ea59c..ee374cc 100644
--- a/image/xcb_image.c
+++ b/image/xcb_image.c
@@ -263,8 +263,11 @@ xcb_image_create (uint16_t width,
* bytes == ~0 we just return the image structure and let
* the caller deal with getting the allocation right.
*/
- if (!base && !data && bytes == ~0)
+ if (!base && !data && bytes == ~0) {
+ image->base = 0;
+ image->data = 0;
return image;
+ }
if (!base && data && bytes == 0)
bytes = image->size;
image->base = base;