Fix suspend event initialize bug
[platform/core/appfw/app-core.git] / 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;