aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2011-06-08 14:14:54 +0200
committerMax Horn2011-06-08 14:14:54 +0200
commit9f40bdcd2c355115ad1da29ad35e19840c619d54 (patch)
tree0fcca9f8c62ab849720712e1cbf6def45807a711
parent83f8f33c409aefd4fcae3fef5075a04f5a7eb74d (diff)
downloadscummvm-rg350-9f40bdcd2c355115ad1da29ad35e19840c619d54.tar.gz
scummvm-rg350-9f40bdcd2c355115ad1da29ad35e19840c619d54.tar.bz2
scummvm-rg350-9f40bdcd2c355115ad1da29ad35e19840c619d54.zip
DS: Prevent OSystem destructor from deleting _savefileManager
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 8fbe5ac934..47e93cf31a 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -95,6 +95,12 @@ OSystem_DS::OSystem_DS()
OSystem_DS::~OSystem_DS() {
delete _mixer;
+ _mixer = 0;
+
+ // If _savefileManager is not 0, then it points to the OSystem_DS
+ // member variable mpSaveManager. Hence we set _savefileManager to
+ // 0, to prevent the OSystem destructor from trying to delete it.
+ _savefileManager = 0;
}
int OSystem_DS::timerHandler(int t) {