mirror of https://github.com/GNOME/gimp.git
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:
parent
65237901af
commit
f76b79ae26
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue