summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-09-14 07:10:15 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-09-14 07:10:15 (GMT)
commitbec97699f21d4dadcdc1a9f26985c699a374655d (patch)
tree092d98dd7d9e1bc7bd3c884a91d69b3ba58aef1d /src
parentf2f0fc476e032ada5460f251aace7878e1cd3934 (diff)
Handle Python bad plugins without name.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/plugin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index 0281617..b96decd 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -820,6 +820,15 @@ char *g_plugin_module_get_modname(const GPluginModule *plugin)
result = class->get_modname(plugin);
+ /**
+ * Tente une opération de la dernière chance.
+ *
+ * Dans le cas d'un module Python, la fonction de classe peut ne pas
+ * trouver de support si l'extension Python n'est pas au point.
+ */
+ if (result == NULL && class->get_modname != _g_plugin_module_get_modname)
+ result = _g_plugin_module_get_modname(plugin);
+
return result;
}