From 878085251e1ababe347a8b71e0e39fc131413ceb Mon Sep 17 00:00:00 2001 From: Henning Hasemann Date: Sat, 16 Jun 2012 18:46:53 +0200 Subject: [PATCH] Fixed typo bug in Surface class --- lib/surface.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/surface.cc b/lib/surface.cc index aac8165..3895481 100644 --- a/lib/surface.cc +++ b/lib/surface.cc @@ -40,7 +40,7 @@ void Surface::loadFromFile(const std::string& filename) { buildGLTexture(sdlSurface); #else SDL_Surface* image = IMG_Load_RW(getRW(filename, MODE_READ), true); - if(!sdlSurface) { + if(!image) { throw SDLException(std::string("Could not load surface '") + filename + "'"); } SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);