From 76235cd0cac7b8fd153ca75868bb846d04a68cd5 Mon Sep 17 00:00:00 2001 From: zmike Date: Mon, 20 Jan 2014 13:25:59 -0500 Subject: [PATCH] prefs init should probably clean up after itself when it fucks up --- src/lib/elm_prefs.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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); } -- 2.34.1