Skip to content

Commit

Permalink
Fixed typo bug in Surface class
Browse files Browse the repository at this point in the history
  • Loading branch information
Henning Hasemann committed Jun 16, 2012
1 parent 6ed5e7a commit 8780852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/surface.cc
Expand Up @@ -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);
Expand Down

0 comments on commit 8780852

Please sign in to comment.