From 18632b7f5f8fc1e03746f482a15741e94e559b58 Mon Sep 17 00:00:00 2001 From: oy Date: Sun, 5 Sep 2010 14:09:55 +0200 Subject: fixed last commit --- src/engine/client/graphics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/engine/client/graphics.cpp') 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; } -- cgit 1.4.1