From: zmike Date: Mon, 20 Jan 2014 18:25:59 +0000 (-0500) Subject: prefs init should probably clean up after itself when it fucks up X-Git-Tag: v1.9.0-alpha1~174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76235cd0cac7b8fd153ca75868bb846d04a68cd5;p=platform%2Fupstream%2Felementary.git prefs init should probably clean up after itself when it fucks up --- diff --git a/src/lib/elm_prefs.c b/src/lib/elm_prefs.c index 7203f8dab..443b49ea0 100644 --- a/src/lib/elm_prefs.c +++ b/src/lib/elm_prefs.c @@ -2136,17 +2136,21 @@ _elm_prefs_init(void) _elm_prefs_descriptors_init(); _elm_prefs_data_init(); - _elm_prefs_page_widgets_map = eina_hash_string_superfast_new(NULL); - _elm_prefs_item_widgets_map = eina_hash_string_superfast_new(NULL); - _elm_prefs_item_type_widgets_map = eina_hash_int32_new(NULL); - if (!(m = _elm_module_find_as("prefs_iface"))) { - DBG("prefs iface module could not be loaded," + WRN("prefs iface module could not be loaded," " the prefs widget won't function"); + --_elm_prefs_init_count; + _elm_prefs_descriptors_shutdown(); + _elm_prefs_data_shutdown(); return; } + + _elm_prefs_page_widgets_map = eina_hash_string_superfast_new(NULL); + _elm_prefs_item_widgets_map = eina_hash_string_superfast_new(NULL); + _elm_prefs_item_type_widgets_map = eina_hash_int32_new(NULL); + m->init_func(m); }