Mercurial > pidgin
changeset 12992:9d8025ec5e23
[gaim-migrate @ 15345]
Etan is right about the dependent plugin unloading.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 22 Jan 2006 21:14:40 +0000 |
parents | c1b2ba353e85 |
children | da97f9675fac |
files | src/plugin.c |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugin.c Sun Jan 22 21:02:52 2006 +0000 +++ b/src/plugin.c Sun Jan 22 21:14:40 2006 +0000 @@ -607,7 +607,7 @@ gaim_plugin_unload(GaimPlugin *plugin) { #ifdef GAIM_PLUGINS - GList *l, *l_next; + GList *l; g_return_val_if_fail(plugin != NULL, FALSE); @@ -626,17 +626,11 @@ plugin->loaded = FALSE; /* Unload all plugins that depend on this plugin. */ - /* XXX Does this want to be while (plugin->dependent_plugins != NULL) - * instead of this loop? I fixed it to get l->next before calling - * gaim_plugin_unload (which can change the list here). This worked - * much better for me but I'm not 100% sure it will always work. */ - for (l = plugin->dependent_plugins; l != NULL; l = l_next) + while ((l = plugin->dependent_plugins) != NULL) { const char * dep_name = (const char *)l->data; GaimPlugin *dep_plugin; - l_next = l->next; - dep_plugin = gaim_plugins_find_with_id(dep_name); if (dep_plugin != NULL && gaim_plugin_is_loaded(dep_plugin))