Mercurial > pidgin
comparison libpurple/plugin.c @ 18626:f05360b5470d
Fix core plugin dependency registering for gtkbuddynote to happen in plugin_init() so that it can work correctly. Add an additional sanity check in the core plugin unloading so that messed up dependency registrations don't cause crashes in the future. Thanks to deryni for helping figure this out.
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Tue, 24 Jul 2007 03:52:21 +0000 |
| parents | 2b8d4fabc103 |
| children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
| 18625:672dd03f538a | 18626:f05360b5470d |
|---|---|
| 690 const char *dep_name = (const char *)l->data; | 690 const char *dep_name = (const char *)l->data; |
| 691 PurplePlugin *dependency; | 691 PurplePlugin *dependency; |
| 692 | 692 |
| 693 dependency = purple_plugins_find_with_id(dep_name); | 693 dependency = purple_plugins_find_with_id(dep_name); |
| 694 | 694 |
| 695 dependency->dependent_plugins = g_list_remove(dependency->dependent_plugins, plugin->info->id); | 695 if (dependency != NULL) |
| 696 dependency->dependent_plugins = g_list_remove(dependency->dependent_plugins, plugin->info->id); | |
| 697 else | |
| 698 purple_debug_error("plugins", "Unable to remove from dependency list for %s\n", dep_name); | |
| 696 } | 699 } |
| 697 | 700 |
| 698 if (plugin->native_plugin) { | 701 if (plugin->native_plugin) { |
| 699 if (plugin->info->unload != NULL) | 702 if (plugin->info->unload != NULL) |
| 700 plugin->info->unload(plugin); | 703 plugin->info->unload(plugin); |
