summaryrefslogtreecommitdiff
path: root/openbox/engine.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-04-06 08:25:35 +0000
committerDana Jansens <danakj@orodu.net>2003-04-06 08:25:35 +0000
commitee2368044dd077207962f71194158265c74fe74e (patch)
tree140fccf0f10140dcb183a98fb96abb53d9df71a4 /openbox/engine.c
parent8d08de4bb62ad9a114488e4ca281d4dcc03d84d9 (diff)
clean up the module if load() fails
Diffstat (limited to 'openbox/engine.c')
-rw-r--r--openbox/engine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbox/engine.c b/openbox/engine.c
index 34d72918..15722e32 100644
--- a/openbox/engine.c
+++ b/openbox/engine.c
@@ -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);