mirror of https://github.com/GNOME/gimp.git
app: do not feed babl with empty color palette.
Since commit 4cf38d784f
, when loading an indexed image, we would first
initialize a palette with 0 colors, then set it to the right colors.
Babl outputs the following message when initializing to 0 colors:
> ../../src/babl/babl/babl-internal.h:214 babl_log()
> attempt to create a palette with 0 colors. using default palette instead.
Let's only set the palette to Babl when it has colors.
This commit is contained in:
parent
e7ef9be000
commit
f13691558d
|
@ -144,7 +144,7 @@ gimp_image_colormap_update_formats (GimpImage *image)
|
|||
|
||||
g_free (format_name);
|
||||
|
||||
if (private->palette)
|
||||
if (private->palette && gimp_palette_get_n_colors (private->palette) > 0)
|
||||
{
|
||||
guchar *colormap;
|
||||
gint n_colors;
|
||||
|
|
Loading…
Reference in New Issue