From bb436e6750e349962e057b794f81ac02283bd127 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 10 Mar 2015 16:37:57 -0400 Subject: [PATCH] don't reuse wl surface pixmaps without adding a ref --- src/bin/e_comp_wl.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 9c9ef25..60132b6 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1419,20 +1419,16 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso wl_client_get_credentials(client, &pid, NULL, NULL); win = e_comp_wl_id_get(id, pid); - /* check for existing pixmap */ - if (!(ep = e_pixmap_find(E_PIXMAP_TYPE_WL, win))) + /* try to create new pixmap */ + if (!(ep = e_pixmap_new(E_PIXMAP_TYPE_WL, win))) { - /* try to create new pixmap */ - if (!(ep = e_pixmap_new(E_PIXMAP_TYPE_WL, win))) - { - ERR("Could not create new pixmap"); - wl_resource_destroy(res); - wl_client_post_no_memory(client); - return; - } + ERR("Could not create new pixmap"); + wl_resource_destroy(res); + wl_client_post_no_memory(client); + return; } - DBG("\tUsing Pixmap: %d", id); + DBG("\tUsing Pixmap: %p", ep); /* set reference to pixmap so we can fetch it later */ wl_resource_set_user_data(res, ep); -- 2.7.4