From be53fc074afd6bfc2a9e2b16dadbde372fb7cd09 Mon Sep 17 00:00:00 2001 From: Andrej Sinicyn Date: Thu, 11 Aug 2005 08:21:51 +0000 Subject: Little cleanup and simplification. --- src/resources/image.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/resources') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 2bf4721f..38ed994b 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -250,12 +250,9 @@ Image* Image::load(void* buffer, unsigned int bufferSize) void Image::unload() { // Free the image surface. - if (!useOpenGL) { - if (image != NULL) { + if (!useOpenGL && (image != NULL)) { SDL_FreeSurface(image); image = NULL; - loaded = false; - } } loaded = false; } -- cgit v1.2.3-70-g09d2