diff options
author | Alon Levy <alevy@redhat.com> | 2012-08-09 15:39:40 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-10-23 18:46:59 +0200 |
commit | 4dd59d97aae81cb3d9f6396ebaf2be0a04a2660b (patch) | |
tree | 73c4169aa3661b33b075cbc1f5002ffff8929a3f | |
parent | 8dadba07e0fed6f9911dd0a12a4cb349bc74df57 (diff) |
qxl_image_create: fix unsaved image handle (fold)
-rw-r--r-- | src/qxl_image.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qxl_image.c b/src/qxl_image.c index e1a377a..792e1ba 100644 --- a/src/qxl_image.c +++ b/src/qxl_image.c @@ -129,7 +129,7 @@ remove_image_info (image_info_t *info) #define MIN(a,b) (((a) < (b))? (a) : (b)) struct QXLImage * -qxl_image_create (qxl_screen_t *qxl, uint32_t *handle, +qxl_image_create (qxl_screen_t *qxl, uint32_t *image_handle, qxl_cmd_t *cmd, const uint8_t *data, int x, int y, int width, int height, int stride, int Bpp, Bool fallback) @@ -142,7 +142,6 @@ qxl_image_create (qxl_screen_t *qxl, uint32_t *handle, uint32_t chunk_handle; uint32_t tail_handle; uint32_t head_handle; - uint32_t image_handle; int dest_stride = (width * Bpp + 3) & (~3); int h; @@ -200,7 +199,8 @@ qxl_image_create (qxl_screen_t *qxl, uint32_t *handle, } /* Image */ - image = qxl->alloc_data(qxl, &image_handle, sizeof *image, "image struct"); + image = qxl->alloc_data(qxl, image_handle, sizeof *image, + "image struct"); image->descriptor.id = 0; image->descriptor.type = SPICE_IMAGE_TYPE_BITMAP; @@ -231,7 +231,7 @@ qxl_image_create (qxl_screen_t *qxl, uint32_t *handle, image->bitmap.y = height; image->bitmap.stride = dest_stride; image->bitmap.palette = 0; - qxl->add_reloc(qxl, cmd, image, image_handle, + qxl->add_reloc(qxl, cmd, image, *image_handle, offsetof(QXLImage, bitmap.data), head, head_handle, 0); |