Fix suspend event initialize bug 63/213663/5
authorhyunho <hhstark.kang@samsung.com>
Tue, 10 Sep 2019 03:55:01 +0000 (12:55 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 10 Sep 2019 04:58:47 +0000 (13:58 +0900)
The initial sate of event is NULL and
the value of APPCORE_BASE_SUSPENDED_STATE_WILL_ENTER_SUSPEND is also 0
therefore, suspend event cannot be called

Change-Id: I67ad2be73f9aaeeb7c951d6c3009164c5e666b3b
Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/base/appcore_base.c

index b45ddf9..6ac694a 100644 (file)
@@ -1409,7 +1409,12 @@ EXPORT_API appcore_base_event_h appcore_base_add_event(enum appcore_base_event e
        node->cb = cb;
        node->type = event;
        node->data = data;
-       node->prev_event = NULL;
+
+       if (event == APPCORE_BASE_EVENT_LANG_CHANGE ||
+                       event == APPCORE_BASE_EVENT_REGION_CHANGE)
+               node->prev_event = NULL;
+       else
+               node->prev_event = GINT_TO_POINTER(-1);
        __events = g_list_append(__events, node);
 
        return node;