From f6245e55359602833c6346e1b0951fd6de9857d9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 15 Oct 2015 12:40:00 -0400 Subject: [PATCH] reject deleted clients from x11 sync alarm event callback E_Client->comp_data is null after a client has been deleted, so attempting to handle events which require the dereferencing of this pointer after a client has been deleted will result in a crash these events should be rejected after delete regardless, since at this time the compositor has stopped handling events for the client ref f42c6aa1871cca6c6ffb39b65e2bfa3815bff35c --- src/bin/e_comp_x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index f364d2dae..57f3b753e 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -2461,16 +2461,14 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event unsigned int serial; E_Client *ec; Eina_Bool resize = EINA_FALSE; - E_Comp_X_Client_Data *cl; ec = _e_comp_x_client_find_by_alarm(ev->alarm); - if (!ec) return ECORE_CALLBACK_RENEW; + if ((!ec) || e_object_is_del(E_OBJECT(ec))) return ECORE_CALLBACK_RENEW; if (ec->netwm.sync.wait) ec->netwm.sync.wait--; - cl = _e_comp_x_client_data_get(ec); - if ((cl) && (ecore_x_sync_counter_query(cl->sync_counter, &serial))) + if (ecore_x_sync_counter_query(_e_comp_x_client_data_get(ec)->sync_counter, &serial)) { E_Client_Pending_Resize *pnd = NULL;