Commit b8abac17 authored by Thomas Manni's avatar Thomas Manni

app: fix crash when deleting channel

parent d8009a00
Pipeline #251677 passed with stages
in 37 minutes and 30 seconds
......@@ -5358,6 +5358,7 @@ gimp_image_remove_channel (GimpImage *image,
private = GIMP_IMAGE_GET_PRIVATE (image);
selected_channels = gimp_image_get_selected_channels (image);
selected_channels = g_list_copy (selected_channels);
if (push_undo)
gimp_image_undo_push_channel_remove (image, C_("undo-type", "Remove Channel"), channel,
......@@ -5382,6 +5383,8 @@ gimp_image_remove_channel (GimpImage *image,
gimp_image_unset_selected_channels (image);
}
g_list_free (selected_channels);
gimp_item_end_move (GIMP_ITEM (channel), push_undo);
g_object_unref (channel);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment