[Scummvm-cvs-logs] SF.net SVN: scummvm:[54242] scummvm/trunk/base/main.cpp
Bluddy at users.sourceforge.net
Bluddy at users.sourceforge.net
Mon Nov 15 14:36:34 CET 2010
Revision: 54242
http://scummvm.svn.sourceforge.net/scummvm/?rev=54242&view=rev
Author: Bluddy
Date: 2010-11-15 13:36:34 +0000 (Mon, 15 Nov 2010)
Log Message:
-----------
PLUGINS: moved plugin-at-a-time unload to be after deleting the engine.
Calling the Engine's destructor after unloading the plugin caused crashes.
Modified Paths:
--------------
scummvm/trunk/base/main.cpp
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2010-11-15 12:48:54 UTC (rev 54241)
+++ scummvm/trunk/base/main.cpp 2010-11-15 13:36:34 UTC (rev 54242)
@@ -215,11 +215,6 @@
// Run the engine
Common::Error result = engine->run();
-#if defined(ONE_PLUGIN_AT_A_TIME) && defined(DYNAMIC_MODULES)
- // do our best to prevent fragmentation by unloading as soon as we can
- PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false);
-#endif
-
// Inform backend that the engine finished
system.engineDone();
@@ -410,6 +405,11 @@
// Try to run the game
Common::Error result = runGame(plugin, system, specialDebug);
+ #if defined(ONE_PLUGIN_AT_A_TIME) && defined(DYNAMIC_MODULES)
+ // do our best to prevent fragmentation by unloading as soon as we can
+ PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, NULL, false);
+ #endif
+
// Did an error occur ?
if (result != Common::kNoError) {
// Shows an informative error dialog if starting the selected game failed.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list