From 5a35288a7524c6b5cb9a4e8e3aa93d756b016743 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 1 Mar 2013 03:25:45 +0300 Subject: Fix arrow images load. --- src/resources/imagehelper.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/resources/imagehelper.cpp') 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); -- cgit v1.2.3-70-g09d2