[gimp] app: fix crash when deleting channel
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix crash when deleting channel
- Date: Sun, 31 Jan 2021 09:21:12 +0000 (UTC)
commit b8abac1777c55ef1680e0b9b28ad8e64edb15097
Author: Thomas Manni <thomas manni free fr>
Date: Sun Jan 31 10:16:59 2021 +0100
app: fix crash when deleting channel
app/core/gimpimage.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 7ac19ebbdf..604cb49d25 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]