From 90bd11a2b6741805aee06d27892d5735fefe152b Mon Sep 17 00:00:00 2001 From: Boram Park Date: Wed, 16 Sep 2015 18:45:29 +0900 Subject: [PATCH] ref/unref a tbm_surface object Change-Id: I101ad9a7854af0916efa9c118b5d3759b616145b --- src/wayland-tbm-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland-tbm-client.c b/src/wayland-tbm-client.c index c61a5fe..30e4006 100755 --- a/src/wayland-tbm-client.c +++ b/src/wayland-tbm-client.c @@ -310,6 +310,7 @@ wayland_tbm_client_create_buffer(struct wayland_tbm_client *tbm_client, tbm_surf } wl_buffer_set_user_data(wl_buffer, surface); + tbm_surface_internal_ref(surface); for (i = 0; i < TBM_SURF_PLANE_MAX; i++) { if (is_fd == 1 && (bufs[i] > 0)) @@ -344,7 +345,7 @@ wayland_tbm_client_destroy_buffer(struct wayland_tbm_client *tbm_client, struct wl_buffer_set_user_data(buffer, NULL); wl_buffer_destroy(buffer); if (surface) - tbm_surface_destroy(surface); + tbm_surface_internal_unref(surface); } -- 2.7.4