[gimp/gimp-2-10] Issue 2052 - Crash when using the flip tool
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue 2052 - Crash when using the flip tool
- Date: Mon, 20 Aug 2018 08:24:34 +0000 (UTC)
commit 0e3084a9d14e8d75013ef6543e699fca716d46a9
Author: Ell <ell_se yahoo com>
Date: Mon Aug 20 04:18:22 2018 -0400
Issue 2052 - Crash when using the flip tool
In gimp_transform_tool_transform(), use "active_item", instead of
"tool->drawable", when cutting/pasting the selected portion of a
layer for transformation. The latter is a remnant of the old
transform-tool code, and is not guaranteed to be correspond to the
correct drawable, or even to a valid drawable (i.e., it can
potentially produce wrong results, or segfault.)
(cherry picked from commit 9420805525b086f47dea52b9c42bac2936361835)
app/tools/gimptransformtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index e09d9eac1b..cf8cb328b7 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -459,10 +459,10 @@ gimp_transform_tool_transform (GimpTransformTool *tr_tool,
switch (options->type)
{
case GIMP_TRANSFORM_TYPE_LAYER:
- if (! gimp_viewable_get_children (GIMP_VIEWABLE (tool->drawable)) &&
+ if (! gimp_viewable_get_children (GIMP_VIEWABLE (active_item)) &&
! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
- orig_buffer = gimp_drawable_transform_cut (tool->drawable,
+ orig_buffer = gimp_drawable_transform_cut (GIMP_DRAWABLE (active_item),
context,
&orig_offset_x,
&orig_offset_y,
@@ -500,7 +500,7 @@ gimp_transform_tool_transform (GimpTransformTool *tr_tool,
/* paste the new transformed image to the image...also implement
* undo...
*/
- gimp_drawable_transform_paste (tool->drawable,
+ gimp_drawable_transform_paste (GIMP_DRAWABLE (active_item),
new_buffer, buffer_profile,
new_offset_x, new_offset_y,
new_layer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]