Bug 675825 - (cage) simply using cage transform tool makes gimp to crash.

Just check if there is enough handles before closing
This commit is contained in:
Michael Muré 2012-05-11 12:02:58 +09:00
parent 1a624d4df4
commit d9ba8b81da
2 changed files with 1 additions and 2 deletions

View File

@ -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. */

View File

@ -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,