edje: let's not segfault when we remove a non existant callback.
authorCedric BAIL <cedric.bail@samsung.com>
Tue, 19 Mar 2013 05:48:57 +0000 (14:48 +0900)
committerCedric BAIL <cedric.bail@samsung.com>
Tue, 19 Mar 2013 05:48:57 +0000 (14:48 +0900)
src/lib/edje/edje_signal.c

index 64c9e4a93dfac14710900f00684f675514c4f9fc..0798ae00480e8d428e655b8fa8d9e0d6ec66676d 100644 (file)
@@ -332,6 +332,8 @@ _edje_signal_callback_disable(const Edje_Signal_Callback_Group *cgp,
    Edje_Signal_Callback_Group *gp = (Edje_Signal_Callback_Group*) cgp;
    unsigned int i;
 
+   if (!gp || !gp->matches) return NULL;
+
    // FIXME: Shall we check DELETE_ME flags ?
    for (i = 0; i < gp->matches->matches_count; ++i)
      {