summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/resources/image.cpp5
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bbda0a0c..3c12c3bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-11 Andrej Sinicyn <andrej4000@gmail.com>
+
+ * src/resources/image.cpp: Little cleanup and simplification.
+
2005-08-10 Björn Steinbrink <B.Steinbrink@gmx.de>
* src/engine.cpp, src/graphics.cpp, src/graphics.h,
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;
}