From 1c8197780ef947c9b9e49073935570bbb350767c Mon Sep 17 00:00:00 2001 From: Emre Ucan Date: Mon, 20 Jul 2015 16:52:41 +0200 Subject: ivi-controller: use image_size for surface_screenshot API image_buffer has a size of image_size. Therefore, image_size should be used in the write operation. Otherwise, weston crashes. Signed-off-by: Emre Ucan --- weston-ivi-shell/src/ivi-controller-impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c index b92b4ce..1f0ae95 100644 --- a/weston-ivi-shell/src/ivi-controller-impl.c +++ b/weston-ivi-shell/src/ivi-controller-impl.c @@ -830,7 +830,7 @@ controller_surface_screenshot(struct wl_client *client, free(buffer); if (save_as_bitmap(filename, (const char *)image_buffer, - size, width, height, 24) != 0) { + image_size, width, height, 24) != 0) { weston_log("failed to take screenshot\n"); } -- cgit v1.2.1