Bill Skaggs <weskaggs@primate.ucdavis.edu>

* app/core/gimpimage-convert.c: check for non-empty palette
	before converting to indexed using custom palette, otherwise
	show warning and abort;	fixes bug #170973.
This commit is contained in:
William Skaggs 2005-03-20 20:01:55 +00:00
parent 65237901af
commit f76b79ae26
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-03-20 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-convert.c: check for non-empty palette
before converting to indexed using custom palette, otherwise
show warning and abort; fixes bug #170973.
2005-03-20 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage-convert.c: applied patch from Adam

View File

@ -798,6 +798,13 @@ gimp_image_convert (GimpImage *gimage,
g_return_if_fail (new_type != gimp_image_base_type (gimage));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (palette_type == GIMP_CUSTOM_PALETTE)
if (! custom_palette || ! custom_palette->n_colors)
{
g_message (_("Cannot convert image, palette is empty"));
return;
}
theCustomPalette = custom_palette;
gimp_set_busy (gimage->gimp);