Fix build bustage caused by d352b55567.

This commit is contained in:
Pale Moon
2016-09-22 21:51:55 +02:00
parent 9b919c4965
commit dc6288e56c
+8 -4
View File
@@ -837,10 +837,14 @@ nsPNGDecoder::frame_info_callback(png_structp png_ptr, png_uint_32 frame_num)
width = png_get_next_frame_width(png_ptr, decoder->mInfo);
height = png_get_next_frame_height(png_ptr, decoder->mInfo);
if (width == 0)
png_error(png_ptr, "Frame width must not be 0");
if (height == 0)
png_error(png_ptr, "Frame height must not be 0");
if (width == 0) {
PR_LOG(GetPNGLog(), PR_LOG_ERROR, ("libpng error: Frame width must not be 0\n"));
longjmp(png_jmpbuf(png_ptr), 1);
}
if (height == 0) {
PR_LOG(GetPNGLog(), PR_LOG_ERROR, ("libpng error: Frame height must not be 0\n"));
longjmp(png_jmpbuf(png_ptr), 1);
}
decoder->CreateFrame(x_offset, y_offset, width, height, decoder->format);