Add callback checking 26/53626/2 accepted/tizen/mobile/20151208.130206 accepted/tizen/tv/20151208.130225 accepted/tizen/wearable/20151208.130242 submit/tizen/20151208.092302
authorVolodymyr Brynza <v.brynza@samsung.com>
Tue, 8 Dec 2015 08:36:09 +0000 (10:36 +0200)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 8 Dec 2015 09:07:33 +0000 (01:07 -0800)
Change-Id: I26b518f3c0fc6ce0a3e6f0e0681cbc86ae8c8219
Signed-off-by: Volodymyr Brynza <v.brynza@samsung.com>
src/common/glib-glue.c

index 2df2ea7427dbfa1093c49e5a7d6277cfb2521fa5..8ffd3a8e628a7b2196b3cb9b975a49bdebd24943 100644 (file)
@@ -171,8 +171,14 @@ static void del_io(void *glue_data, void *id)
 
 static gboolean timer_cb(gpointer user_data)
 {
+    if (user_data == NULL)
+        return FALSE;
+
     tmr_t *t = (tmr_t *)user_data;
 
+    if (t->cb == NULL)
+        return FALSE;
+
     t->cb(t->glue_data, t, t->user_data);
 
     return TRUE;
@@ -231,8 +237,14 @@ static void mod_timer(void *glue_data, void *id, unsigned int msecs)
 
 static gboolean defer_cb(void *user_data)
 {
+    if (user_data == NULL)
+        return FALSE;
+
     dfr_t *d = (dfr_t *)user_data;
 
+    if (d->cb == NULL)
+        return FALSE;
+
     d->cb(d->glue_data, d, d->user_data);
 
     return TRUE;