Check return value 35/172335/1
authorhyunho <hhstark.kang@samsung.com>
Tue, 13 Mar 2018 08:34:41 +0000 (17:34 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 13 Mar 2018 08:34:41 +0000 (17:34 +0900)
Change-Id: I5a61c0fc7de424f5811318b192bac6ee64267d20
Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/legacy/appcore.c

index aa21f4c..82d28bc 100644 (file)
@@ -57,8 +57,12 @@ static struct appcore_context __context;
 EXPORT_API int appcore_set_event_callback(enum appcore_event event,
                                          int (*cb) (void *, void *), void *data)
 {
-       if (__handles[event])
-               appcore_base_remove_event(__handles[event]);
+       int ret;
+       if (__handles[event]) {
+               ret = appcore_base_remove_event(__handles[event]);
+               if (ret != 0)
+                       _ERR("Fail to remove event");
+       }
        __handles[event] = appcore_base_add_event((enum appcore_base_event)__convertor[event], cb, data);
 
        return 0;