diff --git a/engines/ngi/gfx.cpp b/engines/ngi/gfx.cpp index 5858761232e..680b50526db 100644 --- a/engines/ngi/gfx.cpp +++ b/engines/ngi/gfx.cpp @@ -577,7 +577,9 @@ void Picture::draw(int x, int y, int style, int angle) { case 1: { //flip const Dims dims = getDimensions(); - _bitmap->flipVertical()->drawShaded(1, x1, y1 + 30 + dims.y, *pal, _alpha); + Bitmap *flipped = _bitmap->flipVertical(); + flipped->drawShaded(1, x1, y1 + 30 + dims.y, *pal, _alpha); + delete flipped; break; } case 2: diff --git a/engines/ngi/statics.cpp b/engines/ngi/statics.cpp index a27113da6ba..f5be08befac 100644 --- a/engines/ngi/statics.cpp +++ b/engines/ngi/statics.cpp @@ -496,7 +496,9 @@ void Movement::draw(bool flipFlag, int angle) { } if (flipFlag) { - bmp->flipVertical()->drawShaded(1, x, y + 30 + _currDynamicPhase->_rect.bottom, _currDynamicPhase->getPaletteData(), _currDynamicPhase->getAlpha()); + Bitmap *flipped = bmp->flipVertical(); + flipped->drawShaded(1, x, y + 30 + _currDynamicPhase->_rect.bottom, _currDynamicPhase->getPaletteData(), _currDynamicPhase->getAlpha()); + delete flipped; } else if (angle) { bmp->drawRotated(x, y, angle, _currDynamicPhase->getPaletteData(), _currDynamicPhase->getAlpha()); } else {