diff options
Diffstat (limited to 'src/plugins/plugin.c')
-rw-r--r-- | src/plugins/plugin.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index d14e656..9438f9f 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -159,10 +159,14 @@ static void g_plugin_module_dispose(GPluginModule *plugin) unlock_plugin_list_for_reading(); - class = G_PLUGIN_MODULE_GET_CLASS(plugin); + if (plugin->flags & PSF_LOADED) + { + class = G_PLUGIN_MODULE_GET_CLASS(plugin); - if (class->disable != NULL) - class->disable(plugin); + if (class->disable != NULL) + class->disable(plugin); + + } G_OBJECT_CLASS(g_plugin_module_parent_class)->dispose(G_OBJECT(plugin)); @@ -185,6 +189,8 @@ static void g_plugin_module_finalize(GPluginModule *plugin) { size_t i; /* Boucle de parcours */ + printf("[!!!] Finalizing plugin %s\n", plugin->name); + if (plugin->name != NULL) free(plugin->name); |