about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-09-05 14:09:55 +0200
committeroy <Tom_Adams@web.de>2010-09-05 14:09:55 +0200
commit18632b7f5f8fc1e03746f482a15741e94e559b58 (patch)
tree9ae18cf52336f44fd3baf10a764f1040e99902ef /src/engine
parent44cf6acc3a6fb0c559e9e0e53d725af8a65fd3b6 (diff)
downloadzcatch-18632b7f5f8fc1e03746f482a15741e94e559b58.tar.gz
zcatch-18632b7f5f8fc1e03746f482a15741e94e559b58.zip
fixed last commit
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/graphics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp
index 87cabd08..14a88394 100644
--- a/src/engine/client/graphics.cpp
+++ b/src/engine/client/graphics.cpp
@@ -393,10 +393,12 @@ int CGraphics_OpenGL::LoadPNG(CImageInfo *pImg, const char *pFilename)
 		return 0;
 	}
 	
-	if(png_open_file(&Png, aCompleteFilename) != PNG_NO_ERROR) // ignore_convention
+	int Error = png_open_file(&Png, aCompleteFilename); // ignore_convention
+	if(Error != PNG_NO_ERROR)
 	{
 		dbg_msg("game/png", "failed to open file. filename='%s'", aCompleteFilename);
-		png_close_file(&Png); // ignore_convention
+		if(Error != PNG_FILE_ERROR)
+			png_close_file(&Png); // ignore_convention
 		return 0;
 	}