diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-04-04 20:04:15 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-04-04 20:07:26 +0200 |
commit | 69f04b15c899d16b4f9ae3d9fe9ccb4f7da46ea4 (patch) | |
tree | 9aed999006dd52e62849ccdbfee20f497791b133 /plugins.c | |
parent | 1bd73696a3c8484729460cad8d8e6a44e3649c16 (diff) |
dependency-friendly unloading of plugins;
fixed crashes in artwork loader at shutdown
Diffstat (limited to 'plugins.c')
-rw-r--r-- | plugins.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -722,13 +722,18 @@ plug_load_all (void) { void plug_unload_all (void) { + fprintf (stderr, "plug_unload_all\n"); + plugin_t *p; + for (p = plugins; p; p = p->next) { + if (p->plugin->stop) { + fprintf (stderr, "stopping %s...\n", p->plugin->name); + fflush (stderr); + p->plugin->stop (); + } + } + fprintf (stderr, "stopped all plugins\n"); while (plugins) { plugin_t *next = plugins->next; - if (plugins->plugin->stop) { - fprintf (stderr, "stopping %s...", plugins->plugin->name); - plugins->plugin->stop (); - fprintf (stderr, " [OK]\n"); - } if (plugins->handle) { dlclose (plugins->handle); } |