summaryrefslogtreecommitdiff
path: root/src/resources/imagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-01 03:25:45 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-01 03:25:45 +0300
commit5a35288a7524c6b5cb9a4e8e3aa93d756b016743 (patch)
treeb07dacc245cd0e8c900dc9b72ebc82aceccaf082 /src/resources/imagehelper.cpp
parent9e755afa031f39172292aa82d3df42c1eaa01b03 (diff)
downloadplus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.tar.gz
plus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.tar.bz2
plus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.tar.xz
plus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.zip
Fix arrow images load.
Diffstat (limited to 'src/resources/imagehelper.cpp')
-rw-r--r--src/resources/imagehelper.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp
index eea15d29c..b0e02b75f 100644
--- a/src/resources/imagehelper.cpp
+++ b/src/resources/imagehelper.cpp
@@ -117,9 +117,12 @@ void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image) const
SDL_Surface *ImageHelper::loadPng(SDL_RWops *const rw)
{
- if (!rw || !IMG_isPNG(rw))
+ if (!rw)
+ return nullptr;
+
+ if (!IMG_isPNG(rw))
{
- logger->log("Error, image missing or not png");
+ logger->log("Error, image is not png");
return nullptr;
}
SDL_Surface *const tmpImage = IMG_LoadPNG_RW(rw);