mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
plug-ins: Fix crash when exporting indexed ICNS images
Resolves #12880
Same problem as in 4cd3360d
, just applied to exported ICNS icons instead.
This commit is contained in:
parent
a034283cb0
commit
a723fe27b3
1 changed files with 4 additions and 0 deletions
|
@ -563,6 +563,10 @@ icns_export_image (GFile *file,
|
||||||
/* TODO: Use GimpExportOptions for this when available */
|
/* TODO: Use GimpExportOptions for this when available */
|
||||||
temp_image = gimp_image_new (width, height,
|
temp_image = gimp_image_new (width, height,
|
||||||
gimp_image_get_base_type (image));
|
gimp_image_get_base_type (image));
|
||||||
|
if (gimp_image_get_base_type (image) == GIMP_INDEXED)
|
||||||
|
gimp_image_set_palette (temp_image,
|
||||||
|
gimp_image_get_palette (image));
|
||||||
|
|
||||||
temp_layer = gimp_layer_new_from_drawable (GIMP_DRAWABLE (iter->data),
|
temp_layer = gimp_layer_new_from_drawable (GIMP_DRAWABLE (iter->data),
|
||||||
temp_image);
|
temp_image);
|
||||||
gimp_image_insert_layer (temp_image, temp_layer, NULL, 0);
|
gimp_image_insert_layer (temp_image, temp_layer, NULL, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue