aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index f9dbd232..3a1409d2 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -594,7 +594,10 @@ static void module_unload(ShellModule * module)
name = g_path_get_basename(g_module_name(module->dll));
g_hash_table_foreach_remove(__module_methods, remove_module_methods, name);
- g_module_close(module->dll);
+ if (module->dll) {
+ g_module_close(module->dll);
+ }
+
g_free(module->name);
gdk_pixbuf_unref(module->icon);
@@ -633,6 +636,7 @@ void module_unload_all(void)
g_slist_free(shell->tree->modules);
g_slist_free(shell->merge_ids);
+
shell->merge_ids = NULL;
shell->tree->modules = NULL;
shell->selected = NULL;