aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-23 12:56:34 +0200
committerWillem Jan Palenstijn2015-12-23 21:43:16 +0100
commit7a81e03b254a6615290b2761ca6ea1c0e30e64c8 (patch)
tree60f90700c167e89ef56ae6e5aa525738b750118f /engines/lab
parent9d53245f731a4f4fe53b8e1ddb1f603055583674 (diff)
downloadscummvm-rg350-7a81e03b254a6615290b2761ca6ea1c0e30e64c8.tar.gz
scummvm-rg350-7a81e03b254a6615290b2761ca6ea1c0e30e64c8.tar.bz2
scummvm-rg350-7a81e03b254a6615290b2761ca6ea1c0e30e64c8.zip
LAB: Prevent the Image destructor from deleting external scroll buffers
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/dispman.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index 2ae99a51af..fda890dd19 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -996,6 +996,9 @@ void DisplayMan::scrollDisplayX(int16 dx, uint16 x1, uint16 y1, uint16 x2, uint1
setPen(0);
rectFill(x2 + dx + 1, y1, x2, y2);
}
+
+ // Prevent the Image destructor from deleting the external buffer
+ im._imageData = nullptr;
}
void DisplayMan::scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte *buffer) {
@@ -1027,6 +1030,9 @@ void DisplayMan::scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint1
setPen(0);
rectFill(x1, y2 + dy + 1, x2, y2);
}
+
+ // Prevent the Image destructor from deleting the external buffer
+ im._imageData = nullptr;
}
uint16 DisplayMan::fadeNumIn(uint16 num, uint16 res, uint16 counter) {