From 5ce30d6688f00ae18c51ca4c825ef859d9e22a8b Mon Sep 17 00:00:00 2001 From: barbieri Date: Fri, 4 Sep 2009 02:34:48 +0000 Subject: [PATCH] eina_module must initialize eina_array as it is used. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@42227 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_module.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/lib/eina_module.c b/src/lib/eina_module.c index 6c8a7b6..6d344ab 100644 --- a/src/lib/eina_module.c +++ b/src/lib/eina_module.c @@ -227,6 +227,7 @@ eina_module_init(void) if (EINA_MODULE_LOG_DOM < 0) { EINA_LOG_ERR("Could not register log domain: eina_module"); + eina_safety_checks_shutdown(); eina_log_shutdown(); return 0; } @@ -234,15 +235,29 @@ eina_module_init(void) if (!eina_error_init()) { ERR("Could not initialize eina error module."); - eina_log_shutdown(); - return 0; + goto error_init_error; } EINA_ERROR_WRONG_MODULE = eina_error_msg_register("Wrong file format or no file module found"); EINA_ERROR_MODULE_INIT_FAILED = eina_error_msg_register("Module initialisation function failed"); + if (!eina_array_init()) + { + ERR("Could not initialize eina array module."); + goto array_init_error; + } + end_init: return _eina_module_count; + + array_init_error: + eina_error_shutdown(); + error_init_error: + eina_safety_checks_shutdown(); + eina_log_domain_unregister(EINA_MODULE_LOG_DOM); + EINA_MODULE_LOG_DOM = -1; + eina_log_shutdown(); + return 0; } /** -- 2.7.4