diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-26 16:09:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-26 16:52:08 +0300 |
commit | 929aeb1591e739588cd8cf629e7d7ac5a95261b1 (patch) | |
tree | 2b61b477d0e0ffed31a90ba2d6c019da926282aa /src/resources/image.cpp | |
parent | b661524e8b7b41cec237492ecd52fdda7b9be394 (diff) | |
download | mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.gz mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.bz2 mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.tar.xz mv-929aeb1591e739588cd8cf629e7d7ac5a95261b1.zip |
add surface allocation debug code.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r-- | src/resources/image.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 759a3a055..b5a852996 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -39,6 +39,8 @@ #include "resources/sdlimagehelper.h" #include "resources/subimage.h" +#include "utils/sdlcheckutils.h" + #include <SDL_image.h> #ifndef USE_SDL2 #include <SDL_rotozoom.h> @@ -208,7 +210,7 @@ void Image::unload() { SDLCleanCache(); // Free the image surface. - SDL_FreeSurface(mSDLSurface); + MSDL_FreeSurface(mSDLSurface); mSDLSurface = nullptr; delete [] mAlphaChannel; @@ -398,7 +400,7 @@ Image* Image::SDLgetScaledImage(const int width, const int height) const if (scaledSurface) { scaledImage = imageHelper->load(scaledSurface); - SDL_FreeSurface(scaledSurface); + MSDL_FreeSurface(scaledSurface); } } #endif |