Mercurial > pidgin
comparison src/plugin.c @ 5243:f6e0c689a88b
[gaim-migrate @ 5614]
Crashes are bad, m'kay?
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sun, 27 Apr 2003 21:12:33 +0000 |
| parents | fd81a00480ac |
| children | 503cc9b0a8ef |
comparison
equal
deleted
inserted
replaced
| 5242:fd81a00480ac | 5243:f6e0c689a88b |
|---|---|
| 385 if (gaim_plugin_is_loaded(plugin)) | 385 if (gaim_plugin_is_loaded(plugin)) |
| 386 gaim_plugin_unload(plugin); | 386 gaim_plugin_unload(plugin); |
| 387 | 387 |
| 388 plugins = g_list_remove(plugins, plugin); | 388 plugins = g_list_remove(plugins, plugin); |
| 389 | 389 |
| 390 /* XXX */ | 390 if (plugin->info != NULL && plugin->info->dependencies != NULL) |
| 391 if (plugin->info != NULL && plugin->info->type == GAIM_PLUGIN_PROTOCOL) | 391 g_list_free(plugin->info->dependencies); |
| 392 return; | |
| 393 | 392 |
| 394 if (plugin->native_plugin) { | 393 if (plugin->native_plugin) { |
| 395 | 394 |
| 396 if (plugin->info != NULL && plugin->info->type == GAIM_PLUGIN_LOADER) { | 395 if (plugin->info != NULL && plugin->info->type == GAIM_PLUGIN_LOADER) { |
| 397 GList *exts, *l, *next_l; | 396 GList *exts, *l, *next_l; |
| 434 loader_info = GAIM_PLUGIN_LOADER_INFO(loader); | 433 loader_info = GAIM_PLUGIN_LOADER_INFO(loader); |
| 435 | 434 |
| 436 if (loader_info->destroy != NULL) | 435 if (loader_info->destroy != NULL) |
| 437 loader_info->destroy(plugin); | 436 loader_info->destroy(plugin); |
| 438 } | 437 } |
| 439 | |
| 440 if (plugin->info != NULL && plugin->info->dependencies != NULL) | |
| 441 g_list_free(plugin->info->dependencies); | |
| 442 | 438 |
| 443 if (plugin->path != NULL) g_free(plugin->path); | 439 if (plugin->path != NULL) g_free(plugin->path); |
| 444 if (plugin->error != NULL) g_free(plugin->error); | 440 if (plugin->error != NULL) g_free(plugin->error); |
| 445 | 441 |
| 446 g_free(plugin); | 442 g_free(plugin); |
| 495 void | 491 void |
| 496 gaim_plugins_destroy_all(void) | 492 gaim_plugins_destroy_all(void) |
| 497 { | 493 { |
| 498 #ifdef GAIM_PLUGINS | 494 #ifdef GAIM_PLUGINS |
| 499 | 495 |
| 500 gaim_plugins_unload_all(); | |
| 501 | |
| 502 while (plugins != NULL) | 496 while (plugins != NULL) |
| 503 gaim_plugin_destroy(plugins->data); | 497 gaim_plugin_destroy(plugins->data); |
| 504 | 498 |
| 505 #endif /* GAIM_PLUGINS */ | 499 #endif /* GAIM_PLUGINS */ |
| 506 } | 500 } |
