summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrej Sinicyn <andrej4000@gmail.com>2005-08-11 08:21:51 +0000
committerAndrej Sinicyn <andrej4000@gmail.com>2005-08-11 08:21:51 +0000
commitbe53fc074afd6bfc2a9e2b16dadbde372fb7cd09 (patch)
tree74b4cb0e36d0cb3a3c665cd70546d308e38fbbfe /src/resources
parent7bbe721a23b9caba7a67ac806be10aa536f7f46d (diff)
downloadmana-be53fc074afd6bfc2a9e2b16dadbde372fb7cd09.tar.gz
mana-be53fc074afd6bfc2a9e2b16dadbde372fb7cd09.tar.bz2
mana-be53fc074afd6bfc2a9e2b16dadbde372fb7cd09.tar.xz
mana-be53fc074afd6bfc2a9e2b16dadbde372fb7cd09.zip
Little cleanup and simplification.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/image.cpp5
1 files changed, 1 insertions, 4 deletions
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;
}