[gimp/gimp-2-8] Bug 675825 - (cage) simply using cage transform tool makes gimp to crash.



commit f8bcdcb9a58c832de2ac6bec8b1d27ceb68acb67
Author: Michael Murà <batolettre gmail com>
Date:   Fri May 11 12:02:58 2012 +0900

    Bug 675825 - (cage) simply using cage transform tool makes gimp to crash.
    
    Just check if there is enough handles before closing

 app/gegl/gimpcageconfig.c |    1 -
 app/tools/gimpcagetool.c  |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/app/gegl/gimpcageconfig.c b/app/gegl/gimpcageconfig.c
index 12952af..c310a39 100644
--- a/app/gegl/gimpcageconfig.c
+++ b/app/gegl/gimpcageconfig.c
@@ -32,7 +32,6 @@
 
 /*#define DEBUG_CAGE */
 
-#define N_ITEMS_PER_ALLOC 10
 /* This DELTA is aimed to not have handle on exact pixel during computation,
  * to avoid particular case. It shouldn't be so usefull, but it's a double
  * safety. */
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index bd9c752..2ee55b7 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -418,7 +418,7 @@ gimp_cage_tool_key_press (GimpTool    *tool,
     case GDK_KEY_Return:
     case GDK_KEY_KP_Enter:
     case GDK_KEY_ISO_Enter:
-      if (! ct->cage_complete)
+      if (ct->cage_complete == FALSE && gimp_cage_config_get_n_points (ct->config) > 2)
         {
           g_object_set (gimp_tool_get_options (tool),
                         "cage-mode", GIMP_CAGE_MODE_DEFORM,



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