diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-01 03:25:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-01 03:25:45 +0300 |
commit | 5a35288a7524c6b5cb9a4e8e3aa93d756b016743 (patch) | |
tree | b07dacc245cd0e8c900dc9b72ebc82aceccaf082 /src/resources | |
parent | 9e755afa031f39172292aa82d3df42c1eaa01b03 (diff) | |
download | manaplus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.tar.gz manaplus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.tar.bz2 manaplus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.tar.xz manaplus-5a35288a7524c6b5cb9a4e8e3aa93d756b016743.zip |
Fix arrow images load.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/imagehelper.cpp | 7 |
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); |