diff options
author | Strangerke | 2013-06-30 13:25:55 -0700 |
---|---|---|
committer | Strangerke | 2013-06-30 13:25:55 -0700 |
commit | 111ec7cef2658001373bcdb6a25f827d9d1f8452 (patch) | |
tree | 04b33de8987b0ff4a64edf22ef967a792afd6116 /engines/mortevielle | |
parent | c2610d66e1d0ceb0ab29243a0dcddd2b8dadd22e (diff) | |
parent | 8c070963684933f72581cc061f3aaf5c71960af8 (diff) | |
download | scummvm-rg350-111ec7cef2658001373bcdb6a25f827d9d1f8452.tar.gz scummvm-rg350-111ec7cef2658001373bcdb6a25f827d9d1f8452.tar.bz2 scummvm-rg350-111ec7cef2658001373bcdb6a25f827d9d1f8452.zip |
Merge pull request #1 from criezy/mortevielle
Mortevielle
Diffstat (limited to 'engines/mortevielle')
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 6977ab47c0..46c7c75fa3 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -170,8 +170,10 @@ Common::ErrorCode MortevielleEngine::initialise() { // Load the mort.dat resource Common::ErrorCode result = loadMortDat(); - if (result != Common::kNoError) + if (result != Common::kNoError) { + _screenSurface.free(); return result; + } // Load some error messages (was previously in chartex()) _hintPctMessage = getString(580); // You should have noticed %d hints @@ -204,8 +206,6 @@ Common::ErrorCode MortevielleEngine::initialise() { _currGraphicalDevice = _newGraphicalDevice; hirs(); - free(_cfiecBuffer); - free(_speechManager._cfiphBuffer); return Common::kNoError; } @@ -339,6 +339,11 @@ Common::Error MortevielleEngine::run() { // Run the main game loop mainGame(); + + // Cleanup (allocated in initialise()) + _screenSurface.free(); + free(_speechManager._cfiphBuffer); + free(_cfiecBuffer); return Common::kNoError; } |