diff options
author | Matthew Stewart | 2018-08-02 01:46:20 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | c8335cccd3295281362b8a5f2a755fa0965d473d (patch) | |
tree | 1f066f435e91613ac36adff0e09d10bad5d794d3 /engines | |
parent | c6834a997c93ab8c9cee0bf39204a716383c29bf (diff) | |
download | scummvm-rg350-c8335cccd3295281362b8a5f2a755fa0965d473d.tar.gz scummvm-rg350-c8335cccd3295281362b8a5f2a755fa0965d473d.tar.bz2 scummvm-rg350-c8335cccd3295281362b8a5f2a755fa0965d473d.zip |
STARTREK: Fix memory leak in graphics.cpp
Diffstat (limited to 'engines')
-rw-r--r-- | engines/startrek/graphics.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/startrek/graphics.cpp b/engines/startrek/graphics.cpp index 8a67c5bb18..53bdf38680 100644 --- a/engines/startrek/graphics.cpp +++ b/engines/startrek/graphics.cpp @@ -67,6 +67,8 @@ Graphics::Graphics(StarTrekEngine *vm) : _vm(vm), _egaMode(false) { Graphics::~Graphics() { delete[] _egaData; + delete[] _palData; + delete[] _lutData; delete _font; } @@ -711,10 +713,7 @@ void Graphics::copyBackgroundScreen() { } void Graphics::drawDirectToScreen(SharedPtr<Bitmap> bitmap) { - int xoffset = bitmap->xoffset; - int yoffset = bitmap->yoffset; - - _vm->_system->copyRectToScreen(bitmap->pixels, bitmap->width, xoffset, yoffset, bitmap->width, bitmap->height); + _vm->_system->copyRectToScreen(bitmap->pixels, bitmap->width, bitmap->xoffset, bitmap->yoffset, bitmap->width, bitmap->height); } |