summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/pychrysalide/plugins/plugin.c2
-rw-r--r--src/plugins/plugin.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/plugins/pychrysalide/plugins/plugin.c b/plugins/pychrysalide/plugins/plugin.c
index 2488d21..340c617 100644
--- a/plugins/pychrysalide/plugins/plugin.c
+++ b/plugins/pychrysalide/plugins/plugin.c
@@ -579,6 +579,8 @@ static char *py_plugin_module_get_modname_wrapper(const GPluginModule *plugin)
" script filename." \
)
+ result = NULL;
+
gstate = PyGILState_Ensure();
pyobj = pygobject_new(G_OBJECT(plugin));
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;
}