[gimp] Bug 793428 - Errors when loading an XCF with a saved selection mask
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 793428 - Errors when loading an XCF with a saved selection mask
- Date: Tue, 13 Feb 2018 18:30:10 +0000 (UTC)
commit 38d4aa81214d41225e43b08b3fd5b06176e9f798
Author: Ell <ell_se yahoo com>
Date: Tue Feb 13 13:16:30 2018 -0500
Bug 793428 - Errors when loading an XCF with a saved selection mask
Since commit d0ae244fe85a502446fe9c7b82afdf1b89498966, which
connects GimpChannel instances to their buffer's "changed" signal,
the XCF loading code that steals a channel's buffer when converting
it to a selection mask (which happens when loading an XCF with a
saved selection mask) is unsafe, since fails to perform the
necessary cleanup and setup of the buffer in the old and new
channel objects, respectively.
Perform the buffer transfer using the new
gimp_drawable_steal_buffer(), which does the same thing in a safe
manner.
app/xcf/xcf-load.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index 93d6b2f..25af42f 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -1349,10 +1349,8 @@ xcf_load_channel_props (XcfInfo *info,
gimp_item_get_height (GIMP_ITEM (*channel)));
gimp_image_take_mask (image, mask);
- g_object_unref (GIMP_DRAWABLE (mask)->private->buffer);
- GIMP_DRAWABLE (mask)->private->buffer =
- GIMP_DRAWABLE (*channel)->private->buffer;
- GIMP_DRAWABLE (*channel)->private->buffer = NULL;
+ gimp_drawable_steal_buffer (GIMP_DRAWABLE (mask),
+ GIMP_DRAWABLE (*channel));
g_object_unref (*channel);
*channel = mask;
(*channel)->boundary_known = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]