aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-10 12:39:32 +0200
committerWillem Jan Palenstijn2015-12-23 21:34:00 +0100
commit9f7ad4b5f25e3c9d6437f0ac0e5e26dba4cab330 (patch)
tree6fa6f2465417e175bc3d79dbf5e1c654a8235656 /engines
parent165c0b3b49dbbe5b5758b1ba34667a6f8dd44987 (diff)
downloadscummvm-rg350-9f7ad4b5f25e3c9d6437f0ac0e5e26dba4cab330.tar.gz
scummvm-rg350-9f7ad4b5f25e3c9d6437f0ac0e5e26dba4cab330.tar.bz2
scummvm-rg350-9f7ad4b5f25e3c9d6437f0ac0e5e26dba4cab330.zip
LAB: Fix crash when closing the map
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/map.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index c6b2277280..b484a1e323 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -106,7 +106,6 @@ void LabEngine::loadMapData() {
void LabEngine::freeMapData() {
freeButtonList(&_mapGadgetList);
- delete[] _maps;
delete _imgMap;
delete _imgRoom;
delete _imgUpArrowRoom;
@@ -121,8 +120,8 @@ void LabEngine::freeMapData() {
delete _imgMapEast;
delete _imgMapSouth;
delete _imgMapWest;
- delete _imgXMark;
- delete _maps;
+ // _imgXMark is a pointer to one of the four buffers above
+ delete[] _maps;
_imgMap = nullptr;
_imgRoom = nullptr;