e - comps sync - ec client was null - i think, so protect against crash
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 15 Oct 2015 10:26:00 +0000 (19:26 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 15 Oct 2015 10:29:14 +0000 (19:29 +0900)
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

src/bin/e_comp_x.c

index 9600e4f42c826ed795002e4cde9bd13afa047000..f364d2dae20daf58e67fc8953736ae1ebb2eaf89 100644 (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;