summaryrefslogtreecommitdiff
path: root/src/plugins/plugin.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2025-01-16 01:00:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2025-01-16 01:00:28 (GMT)
commit64b690f0038e01e807c1ec8d62041057fd38b4b8 (patch)
tree1de592f2379547abfb8aedc452958dbdace9b658 /src/plugins/plugin.c
parent8be5b3fb8a516380fc88fd900a98238ce8564682 (diff)
Improve the plugins management.gtk4
Diffstat (limited to 'src/plugins/plugin.c')
-rw-r--r--src/plugins/plugin.c12
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);