clean up the module if load() fails
This commit is contained in:
parent
8d08de4bb6
commit
ee2368044d
1 changed files with 4 additions and 0 deletions
|
@ -159,6 +159,10 @@ void engine_load()
|
|||
return;
|
||||
g_warning("Failed to load the engine '%s'", engine_name);
|
||||
g_message("Falling back to the default: '%s'", DEFAULT_ENGINE);
|
||||
if (module != NULL) {
|
||||
g_module_close(module);
|
||||
module = NULL;
|
||||
}
|
||||
if (!load(DEFAULT_ENGINE)) {
|
||||
g_critical("Failed to load the engine '%s'. Aborting", DEFAULT_ENGINE);
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in a new issue