aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/support/image_decoders.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/titanic/support/image_decoders.cpp b/engines/titanic/support/image_decoders.cpp
index 4203dad97c..495d1d0982 100644
--- a/engines/titanic/support/image_decoders.cpp
+++ b/engines/titanic/support/image_decoders.cpp
@@ -45,6 +45,7 @@ void CJPEGDecode::decode(OSVideoSurface &surface, const CString &name) {
Common::copy((byte *)convertedSurface->getPixels(), (byte *)convertedSurface->getPixels() +
surface.getPitch() * surface.getHeight(), (byte *)surface._rawSurface->getPixels());
+ convertedSurface->free();
delete convertedSurface;
surface.unlock();
}
@@ -72,6 +73,7 @@ void CTargaDecode::decode(OSVideoSurface &surface, const CString &name) {
Common::copy((byte *)convertedSurface->getPixels(), (byte *)convertedSurface->getPixels() +
surface.getPitch() * surface.getHeight(), (byte *)surface._rawSurface->getPixels());
+ convertedSurface->free();
delete convertedSurface;
surface.unlock();
}