Reworked some fixes submitted to us by ittobaal. Several fclose calls he suggested had no bearing (if fopen fails, calling fclose on a null pointer is pointless), but the (missing) array deletions were definitely valid bugs. The fix for CreateTexture() was a little loose, so I cleaned it up somewhat.

Issue: 566
This commit is contained in:
wrenczes
2010-12-27 20:00:33 +00:00
parent 814993ac1c
commit 39e6d4f2b5
4 changed files with 47 additions and 37 deletions
+5 -1
View File
@@ -800,7 +800,11 @@ void JRenderer::ScreenShot(const char* filename)
fp = fopen(filename, "wb");
if (!fp) return;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!png_ptr) return;
if (!png_ptr)
{
fclose(fp);
return;
}
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);