summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/ecore.c5
-rw-r--r--src/tests/ecore/ecore_test_ecore.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index d9c194c77f..58702060ee 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -58,6 +58,7 @@ Eo *_ecore_parent = NULL;
58 58
59static const char *_ecore_magic_string_get(Ecore_Magic m); 59static const char *_ecore_magic_string_get(Ecore_Magic m);
60static int _ecore_init_count = 0; 60static int _ecore_init_count = 0;
61static int _ecore_init_count_threshold = 0;
61int _ecore_log_dom = -1; 62int _ecore_log_dom = -1;
62int _ecore_fps_debug = 0; 63int _ecore_fps_debug = 0;
63 64
@@ -331,6 +332,8 @@ ecore_init(void)
331 if (!_no_system_modules) 332 if (!_no_system_modules)
332 ecore_system_modules_load(); 333 ecore_system_modules_load();
333 334
335 _ecore_init_count_threshold = _ecore_init_count;
336
334 eina_log_timing(_ecore_log_dom, 337 eina_log_timing(_ecore_log_dom,
335 EINA_LOG_STATE_STOP, 338 EINA_LOG_STATE_STOP,
336 EINA_LOG_STATE_INIT); 339 EINA_LOG_STATE_INIT);
@@ -375,7 +378,7 @@ ecore_shutdown(void)
375 _ecore_unlock(); 378 _ecore_unlock();
376 return 0; 379 return 0;
377 } 380 }
378 if (--_ecore_init_count != 0) 381 if (_ecore_init_count-- != _ecore_init_count_threshold)
379 goto unlock; 382 goto unlock;
380 383
381 ecore_system_modules_unload(); 384 ecore_system_modules_unload();
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index f3b260a4d2..08a00e2e27 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -42,6 +42,7 @@ START_TEST(ecore_test_ecore_init)
42 fail_if(ret < 1); 42 fail_if(ret < 1);
43 43
44 ret = ecore_shutdown(); 44 ret = ecore_shutdown();
45 fail_if(ret != 0);
45} 46}
46END_TEST 47END_TEST
47 48