From 9f40bdcd2c355115ad1da29ad35e19840c619d54 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 8 Jun 2011 14:14:54 +0200 Subject: DS: Prevent OSystem destructor from deleting _savefileManager --- backends/platform/ds/arm9/source/osystem_ds.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- cgit v1.2.3