summaryrefslogtreecommitdiff
path: root/src/resources/sdlimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-11 21:37:02 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-11 21:40:17 +0300
commitfacd5ec45b0c75eef9e97983a00c19ff2ecf1fe7 (patch)
tree3668b1fc4be470d2edb4b385de9729d250c300f6 /src/resources/sdlimagehelper.cpp
parent27946f189154cc6a4079d68e895aaf0bbd8172f5 (diff)
downloadmanaverse-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.tar.gz
manaverse-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.tar.bz2
manaverse-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.tar.xz
manaverse-facd5ec45b0c75eef9e97983a00c19ff2ecf1fe7.zip
Add asserts into imagehelpers.
Diffstat (limited to 'src/resources/sdlimagehelper.cpp')
-rw-r--r--src/resources/sdlimagehelper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index 4a8c4eb62..54d9c46c8 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -31,6 +31,7 @@
#include "resources/image/image.h"
+#include "utils/checkutils.h"
#include "utils/sdlcheckutils.h"
#include <SDL_gfxBlitFunc.h>
@@ -49,7 +50,8 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
SDL_Surface *const tmpImage = loadPng(rw);
if (!tmpImage)
{
- logger->log("Error, image load failed: %s", IMG_GetError());
+ reportAlways("Error, image load failed: %s",
+ IMG_GetError());
return nullptr;
}
@@ -173,7 +175,7 @@ Image *SDLImageHelper::createTextSurface(SDL_Surface *const tmpImage,
if (!image)
{
- logger->log1("Error: Image convert failed.");
+ reportAlways("Error: Image convert failed.");
delete [] alphaChannel;
return nullptr;
}
@@ -272,7 +274,7 @@ Image *SDLImageHelper::_SDLload(SDL_Surface *tmpImage)
if (!image)
{
- logger->log1("Error: Image convert failed.");
+ reportAlways("Error: Image convert failed.");
delete [] alphaChannel;
return nullptr;
}