e - comps sync - ec client was null - i think, so protect against crash

i got a crash here and the bt was broken and i couldnt check if
_e_comp_x_client_data_get() returned null, but it's the only thing
that would make sense, so protect against this to avoid a crash. as
this was a one-off, i can't find out more,

@fix
This commit is contained in:
Carsten Haitzler 2015-10-15 19:26:00 +09:00
parent adbb5719f0
commit f42c6aa187
1 changed files with 3 additions and 1 deletions

View File

@ -2461,6 +2461,7 @@ _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;
@ -2468,7 +2469,8 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event
if (ec->netwm.sync.wait)
ec->netwm.sync.wait--;
if (ecore_x_sync_counter_query(_e_comp_x_client_data_get(ec)->sync_counter, &serial))
cl = _e_comp_x_client_data_get(ec);
if ((cl) && (ecore_x_sync_counter_query(cl->sync_counter, &serial)))
{
E_Client_Pending_Resize *pnd = NULL;