From 1b7bb9ee6db6ee4bd48054680eb8460bf63c9796 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 15 May 2016 12:30:52 +0200 Subject: ACCESS: Plug memory leak --- engines/access/room.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/access') diff --git a/engines/access/room.cpp b/engines/access/room.cpp index a7192d330f..a41de63bf6 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -142,7 +142,7 @@ void Room::takePicture() { _vm->_player->_roomNumber = 7; _vm->_room->_function = FN_CLEAR1; return; - } else if (result >= 0) + } else if (result >= 0) _vm->_player->_move = (Direction)(result + 1); _vm->_player->_scrollFlag = false; @@ -715,6 +715,8 @@ void Room::executeCommand(int commandId) { screen.plotImage(spr, _selectCommand + 2, Common::Point(_rMouse[_selectCommand][0], (_vm->getGameID() == GType_MartianMemorandum) ? 184 : 176)); + delete spr; + _vm->_screen->restoreScreen(); _vm->_boxSelect = true; } -- cgit v1.2.3