libgimp: fix NULL colormap for gimp_drawable_get_format()

This commit is contained in:
Simon Budig 2012-04-30 02:24:14 +02:00 committed by Michael Natterer
parent 99c5830e84
commit 43cce00fd9

View file

@ -777,12 +777,13 @@ gimp_drawable_get_format (gint32 drawable_ID)
format = palette; format = palette;
} }
babl_palette_set_palette (format, if (colormap)
babl_format ("R'G'B' u8"), {
colormap, n_colors); babl_palette_set_palette (format,
babl_format ("R'G'B' u8"),
g_free (colormap); colormap, n_colors);
g_free (colormap);
}
} }
else else
{ {