Permalink
Browse files

STARTREK: Fix memory leak in graphics.cpp

  • Loading branch information...
Drenn1 authored and sev- committed Aug 2, 2018
1 parent c6834a9 commit c8335cccd3295281362b8a5f2a755fa0965d473d
Showing with 3 additions and 4 deletions.
  1. +3 −4 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);
}


0 comments on commit c8335cc

Please sign in to comment.