diff options
Diffstat (limited to 'engines/tsage')
-rw-r--r-- | engines/tsage/graphics.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp index 723e50d338..0a1e1eeaa4 100644 --- a/engines/tsage/graphics.cpp +++ b/engines/tsage/graphics.cpp @@ -258,6 +258,10 @@ void GfxSurface::setScreenSurface() { void GfxSurface::create(int width, int height) { assert((width >= 0) && (height >= 0)); _screenSurface = false; + if (_customSurface) { + _customSurface->free(); + delete _customSurface; + } _customSurface = new Graphics::Surface(); _customSurface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); Common::set_to((byte *)_customSurface->pixels, (byte *)_customSurface->pixels + (width * height), 0); |