Browse Source

Destroy plugins in reverse order from initialization.

tags/v2.1.2
Andrew Belt 2 years ago
parent
commit
b956cfcebb
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/plugin.cpp

+ 4
- 2
src/plugin.cpp View File

@@ -315,11 +315,13 @@ static void destroyPlugin(Plugin* plugin) {


void destroy() {
for (Plugin* plugin : plugins) {
while (!plugins.empty()) {
Plugin* plugin = plugins.back();
INFO("Destroying plugin %s", plugin->name.c_str());
destroyPlugin(plugin);
plugins.pop_back();
}
plugins.clear();
assert(plugins.empty());
}




Loading…
Cancel
Save