diff options
author | Filippos Karapetis | 2015-12-24 01:31:55 +0200 |
---|---|---|
committer | Filippos Karapetis | 2015-12-24 01:32:22 +0200 |
commit | 6f6c92d470d50344fb5935b4a8cd6159660d8c5b (patch) | |
tree | 6807e0bd85da035fe223ac3026962c2498bdd93c | |
parent | 7a7a25c91d2c51c465c7d4131c90b6114f715940 (diff) | |
download | scummvm-rg350-6f6c92d470d50344fb5935b4a8cd6159660d8c5b.tar.gz scummvm-rg350-6f6c92d470d50344fb5935b4a8cd6159660d8c5b.tar.bz2 scummvm-rg350-6f6c92d470d50344fb5935b4a8cd6159660d8c5b.zip |
LAB: Prevent the Image destructor from deleting the drawing buffer
-rw-r--r-- | engines/lab/dispman.cpp | 5 | ||||
-rw-r--r-- | engines/lab/tilepuzzle.cpp | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 0f2bc933e8..e9736a9bf3 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -853,7 +853,10 @@ void DisplayMan::doTransWipe(CloseDataPtr *closePtrList, const Common::String fi } // for i } // for j - delete[] bitMapBuffer; + // Prevent the Image destructor from deleting the drawing buffer + imDest._imageData = nullptr; + + // bitMapBuffer will be deleted by the Image destructor } void DisplayMan::doTransition(TransitionType transitionType, CloseDataPtr *closePtrList, const Common::String filename) { diff --git a/engines/lab/tilepuzzle.cpp b/engines/lab/tilepuzzle.cpp index d39612d49a..bea2b61ec4 100644 --- a/engines/lab/tilepuzzle.cpp +++ b/engines/lab/tilepuzzle.cpp @@ -327,6 +327,9 @@ void TilePuzzle::changeCombination(uint16 number) { _numberImages[combnum]->blitBitmap(0, (_numberImages[combnum])->_height - (2 * i), &(display), _vm->_utils->vgaScaleX(COMBINATION_X[number]), _vm->_utils->vgaScaleY(65), (_numberImages[combnum])->_width, 2, false); } + // Prevent the Image destructor from deleting the display buffer + display._imageData = nullptr; + delete[] buffer; bool unlocked = true; |