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:
parent
b96aa6628f
commit
8693bde80d
@ -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>
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user