diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-11 21:37:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-11 21:40:17 +0300 |
commit | facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7 (patch) | |
tree | 3668b1fc4be470d2edb4b385de9729d250c300f6 /src/resources/sdl2imagehelper.cpp | |
parent | 27946f189154cc6a4079d68e895aaf0bbd8172f5 (diff) | |
download | mv-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.tar.gz mv-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.tar.bz2 mv-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.tar.xz mv-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.zip |
Add asserts into imagehelpers.
Diffstat (limited to 'src/resources/sdl2imagehelper.cpp')
-rw-r--r-- | src/resources/sdl2imagehelper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resources/sdl2imagehelper.cpp b/src/resources/sdl2imagehelper.cpp index 7d2c3d8ef..99aa53d2f 100644 --- a/src/resources/sdl2imagehelper.cpp +++ b/src/resources/sdl2imagehelper.cpp @@ -26,6 +26,7 @@ #include "resources/image/image.h" +#include "utils/checkutils.h" #include "utils/sdlcheckutils.h" #include "debug.h" @@ -70,7 +71,10 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage) SDL_Texture *const texture = SDL_CreateTextureFromSurface( mRenderer, tmpImage); if (!texture) + { + reportAlways("Texture from surface creation failed"); return nullptr; + } SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND); return new Image(texture, tmpImage->w, tmpImage->h); } |