BASE: Unload plugins when exiting after processing arguments
When not displaying the GUI, plugins are not unloaded. This can cause problems on AmigaOS where plugins must be unloaded before exiting. Else, some plugins with global destructors cause crashes being destroyed too late.
This commit is contained in:
parent
0b5f5a2962
commit
610fdfade8
1 changed files with 5 additions and 0 deletions
|
@ -457,6 +457,11 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
|
|||
if (Base::processSettings(command, settings, res)) {
|
||||
if (res.getCode() != Common::kNoError)
|
||||
warning("%s", res.getDesc().c_str());
|
||||
|
||||
PluginManager::instance().unloadDetectionPlugin();
|
||||
PluginManager::instance().unloadAllPlugins();
|
||||
PluginManager::destroy();
|
||||
|
||||
return res.getCode();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue