From 63bed529c78ca05d3e32a0b6ec3bcfd6152e53de Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Jun 2011 23:52:17 +0300 Subject: Fix memory leak in desktop.cpp --- src/resources/image.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/resources/image.cpp') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index e9260071f..ec74630ff 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -479,7 +479,10 @@ Image* Image::SDLgetScaledImage(int width, int height) // The load function takes care of the SDL<->OpenGL implementation // and about freeing the given SDL_surface*. if (scaledSurface) + { scaledImage = load(scaledSurface); + SDL_FreeSurface(scaledSurface); + } } return scaledImage; } -- cgit v1.2.3-70-g09d2