[gimp/gimp-2-10] Issue #4734 - GIMP crashed while using Unified Transformation Tool



commit 84fdd1b60176bc84c029c84c93ea052fa1d23cab
Author: Ell <ell_se yahoo com>
Date:   Thu Mar 5 18:56:08 2020 +0200

    Issue #4734 - GIMP crashed while using Unified Transformation Tool
    
    When committing a transformation to a floating-selection layer, if
    the selection mask is non-empty (probably a state we don't want to
    allow, but one that can currently be achieved), and the tool-GUI
    dialog is detached, gimp_transform_grid_tool_response() is called
    *while* applying the transformation, leading, ultimately, to a
    segfault.
    
    Fix this by returning early when this happens.
    
    (cherry picked from commit 11efe64736bb7980d59a85ab6ca4ae3bc1d6196e)

 app/tools/gimptransformgridtool.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/app/tools/gimptransformgridtool.c b/app/tools/gimptransformgridtool.c
index 845eec9e27..709023b4d8 100644
--- a/app/tools/gimptransformgridtool.c
+++ b/app/tools/gimptransformgridtool.c
@@ -1385,6 +1385,12 @@ gimp_transform_grid_tool_response (GimpToolGui           *gui,
   GimpTransformGridOptions *tg_options = GIMP_TRANSFORM_GRID_TOOL_GET_OPTIONS (tg_tool);
   GimpDisplay              *display    = tool->display;
 
+  /* we can get here while already committing a transformation.  just return in
+   * this case.  see issue #4734.
+   */
+  if (! gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tg_tool)))
+    return;
+
   switch (response_id)
     {
     case RESPONSE_RESET:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]