From 792502fc7b0ac399c4431b356dcdf85241c57bfc Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 30 Jul 2015 18:49:35 -0300 Subject: [PATCH] Remove invalid ASSERT() from PngFormat::onSave() The assert can fail if we try to save an indexed image which contain more than 256 colors. --- src/app/file/png_format.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/file/png_format.cpp b/src/app/file/png_format.cpp index 2e9960817..32727355c 100644 --- a/src/app/file/png_format.cpp +++ b/src/app/file/png_format.cpp @@ -385,7 +385,6 @@ bool PngFormat::onSave(FileOp* fop) if (image->pixelFormat() == IMAGE_INDEXED) { int c, r, g, b; int pal_size = fop_sequence_get_ncolors(fop); - ASSERT(pal_size > 0 && pal_size <= PNG_MAX_PALETTE_LENGTH); pal_size = MID(1, pal_size, PNG_MAX_PALETTE_LENGTH); #if PNG_MAX_PALETTE_LENGTH != 256