From facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Aug 2016 21:37:02 +0300 Subject: Add asserts into imagehelpers. --- src/resources/sdl2imagehelper.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/resources/sdl2imagehelper.cpp') 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); } -- cgit v1.2.3-70-g09d2