diff options
author | lukaslw | 2014-08-18 20:53:36 +0200 |
---|---|---|
committer | lukaslw | 2014-08-18 21:47:29 +0200 |
commit | 01bf821e176ade6d74270450cbdcd3eea51686a8 (patch) | |
tree | e88a28a75638bfe4fafdaedc74f006baf5512290 | |
parent | 35c3d362b27c4e23d754e4c0fb9155b0640fc1b5 (diff) | |
download | scummvm-rg350-01bf821e176ade6d74270450cbdcd3eea51686a8.tar.gz scummvm-rg350-01bf821e176ade6d74270450cbdcd3eea51686a8.tar.bz2 scummvm-rg350-01bf821e176ade6d74270450cbdcd3eea51686a8.zip |
PRINCE: dialogImage - second memory leak fix
-rw-r--r-- | engines/prince/prince.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index e5e78139cf..0267cf58bb 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -75,7 +75,7 @@ void PrinceEngine::debugEngine(const char *s, ...) { debug("Prince::Engine %s", buf); } -PrinceEngine::PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc) : +PrinceEngine::PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _graph(nullptr), _script(nullptr), _interpreter(nullptr), _flags(nullptr), _locationNr(0), _debugger(nullptr), _midiPlayer(nullptr), _room(nullptr), _cursor1(nullptr), _cursor2(nullptr), _cursor3(nullptr), _font(nullptr), @@ -95,7 +95,7 @@ PrinceEngine::PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc) _tracePointFirstPointFlag(false), _coordsBuf2(nullptr), _coords2(nullptr), _coordsBuf3(nullptr), _coords3(nullptr), _shanLen(0), _directionTable(nullptr), _currentMidi(0), _lightX(0), _lightY(0), _curveData(nullptr), _curvPos(0), _creditsData(nullptr), _creditsDataSize(0), _currentTime(0), _zoomBitmap(nullptr), _shadowBitmap(nullptr), _transTable(nullptr), - _flcFrameSurface(nullptr), _shadScaleValue(0), _shadLineLen(0), _scaleValue(0) { + _flcFrameSurface(nullptr), _shadScaleValue(0), _shadLineLen(0), _scaleValue(0), _dialogImage(nullptr) { // Debug/console setup DebugMan.addDebugChannel(DebugChannel::kScript, "script", "Prince Script debug channel"); @@ -2863,6 +2863,7 @@ void PrinceEngine::runDialog() { } _dialogImage->free(); delete _dialogImage; + _dialogImage = nullptr; _dialogFlag = false; } |