e_module: _e_modules_hash initialization is done in the e_module_init, not in the... 95/158895/1
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 6 Nov 2017 01:15:07 +0000 (10:15 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 6 Nov 2017 01:15:07 +0000 (10:15 +0900)
Change-Id: Ic3752b63e3918980324facbf9a705011038dda03

src/bin/e_module.c

index 1d2b5b41f2ceb6a18400c9ae551fa96fa6a7b108..8c67ffb529a7c614f49a54329a849ff06f9a85e6 100644 (file)
@@ -328,6 +328,8 @@ e_module_new(const char *name)
    char str[1024];
 
    if (!name) return NULL;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(_e_modules_hash, NULL);
+
    m = E_OBJECT_ALLOC(E_Module, E_MODULE_TYPE, _e_module_free);
    if (!m) return NULL;
 
@@ -441,12 +443,6 @@ e_module_new(const char *name)
 init_done:
 
    _e_modules = eina_list_append(_e_modules, m);
-   if (!_e_modules_hash)
-     {
-        /* wayland module preloading */
-        if (!e_module_init())
-          CRI("WTFFFFF");
-     }
    eina_hash_add(_e_modules_hash, name, m);
    m->name = eina_stringshare_add(name);
    if (modpath)