Only call module onload if its present

This commit is contained in:
Joris Vink 2014-01-11 01:35:44 +01:00
parent d22405cea7
commit ef4289689f

View File

@ -84,7 +84,8 @@ kore_module_reload(void)
if (module->mtime == st.st_mtime)
continue;
module->ocb(KORE_MODULE_UNLOAD);
if (module->ocb != NULL)
module->ocb(KORE_MODULE_UNLOAD);
module->mtime = st.st_mtime;
if (dlclose(module->handle))