]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CImageWriterPNG.cpp
Merging r6039 through r6072 from trunk to ogl-es branch.
[irrlicht.git] / source / Irrlicht / CImageWriterPNG.cpp
index 5c2ead81bdb3defb2231954c8fb9c455dabfbf5d..3da434530d954f8c9f6e04f64ae138b54e4fa9d0 100644 (file)
@@ -163,7 +163,10 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
                break;\r
                // TODO: Error handling in case of unsupported color format\r
        default:\r
-               break;\r
+               os::Printer::log("CImageWriterPNG does not support image format", ColorFormatNames[image->getColorFormat()], ELL_WARNING);\r
+               png_destroy_write_struct(&png_ptr, &info_ptr);\r
+               delete [] tmpImage;\r
+               return false;\r
        }\r
 \r
        // Create array of pointers to rows in image data\r