aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/graphics/transparent_surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/graphics/transparent_surface.cpp')
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 9319899495..0f2279c40e 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -32,7 +32,7 @@ namespace Wintermute {
byte *TransparentSurface::_lookup = NULL;
void TransparentSurface::destroyLookup() {
- delete _lookup;
+ delete[] _lookup;
_lookup = NULL;
}
@@ -394,6 +394,8 @@ TransparentSurface *TransparentSurface::scale(const Common::Rect &srcRect, const
// dstRect(x, y) = srcRect(x * srcW / dstW, y * srcH / dstH);
TransparentSurface *target = new TransparentSurface();
+ assert(format.bytesPerPixel == 4);
+
int srcW = srcRect.width();
int srcH = srcRect.height();
int dstW = dstRect.width();