Do not add active plugins to the list of plugins when they are already in the list (closes #3308191).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5824 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2011-05-29 19:45:16 +00:00
parent b96aa6628f
commit 8693bde80d
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,8 @@
* src/plugins.c:
Define and use get_plugin_path() always and move platform dependent
code into the function definition.
Do not add active plugins to the list of plugins when they are
already in the list (closes #3308191).
2011-05-27 Colomban Wendling <colomban(at)geany(dot)org>

View File

@ -659,7 +659,13 @@ plugin_new(const gchar *fname, gboolean init_plugin, gboolean add_to_list)
{
geany_debug("Plugin \"%s\" already loaded.", fname);
if (add_to_list)
{
/* do not add the to list twice */
if (g_list_find(plugin_list, plugin) != NULL)
return NULL;
plugin_list = g_list_prepend(plugin_list, plugin);
}
return plugin;
}