diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-29 23:52:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-30 00:10:21 +0300 |
commit | 63bed529c78ca05d3e32a0b6ec3bcfd6152e53de (patch) | |
tree | 9d233f3ecf71452123f45b4563fef8be4308769b /src/resources/image.cpp | |
parent | 27300ff284bbed3b6bce938071c3982e4a757680 (diff) | |
download | plus-63bed529c78ca05d3e32a0b6ec3bcfd6152e53de.tar.gz plus-63bed529c78ca05d3e32a0b6ec3bcfd6152e53de.tar.bz2 plus-63bed529c78ca05d3e32a0b6ec3bcfd6152e53de.tar.xz plus-63bed529c78ca05d3e32a0b6ec3bcfd6152e53de.zip |
Fix memory leak in desktop.cpp
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r-- | src/resources/image.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |