check eina_hash is empty 90/119790/1
authorWonnam Jang <wn.jang@samsung.com>
Mon, 20 Mar 2017 06:31:07 +0000 (15:31 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Mon, 20 Mar 2017 06:32:01 +0000 (15:32 +0900)
Change-Id: I5992f81a0ac91dda34dd5ea3264766ba0a97c600
Signed-off-by: Wonnam Jang <wn.jang@samsung.com>
src/vc_elm_core.c

index 09909100aecb024e1c06d6c5742cf7c2f8c762b0..c1130acfe52ad4288c48e646fc36a7ac3effbfce 100644 (file)
@@ -486,17 +486,25 @@ void _vc_elm_core_fini()
                g_allowed_text_part_list = NULL;
        }
 
-       eina_hash_free(g_widget_info_hash);
-       g_widget_info_hash = NULL;
+       if (0 != eina_hash_population(g_widget_info_hash)) {
+               eina_hash_free(g_widget_info_hash);
+               g_widget_info_hash = NULL;
+       }
 
-       eina_hash_free_buckets(registered_item_map);
-       eina_hash_free(registered_item_map);
-       registered_item_map = NULL;
+       if (0 != eina_hash_population(registered_item_map)) {
+               eina_hash_free_buckets(registered_item_map);
+               eina_hash_free(registered_item_map);
+               registered_item_map = NULL;
+       }
 
-       eina_hash_free(g_config_action_map);
-       g_config_action_map = NULL;
-       eina_hash_free(g_config_widget_map);
-       g_config_widget_map = NULL;
+       if (0 != eina_hash_population(g_config_action_map)) {
+               eina_hash_free(g_config_action_map);
+               g_config_action_map = NULL;
+       }
+       if (0 != eina_hash_population(g_config_widget_map)) {
+               eina_hash_free(g_config_widget_map);
+               g_config_widget_map = NULL;
+       }
        _vc_elm_core_destroy_xml_data();
 
 #ifndef SRPOL_DEBUG