Issue #1662 - GIMP crashes while using cage transform when selection is active

Fixed by implementing Massimo's two findings:

gimp_operation_cage_transform_process(): if aux_buf is NULL, bail out
after initializing out_buf with identity vectors, fixes the crash.

gimp_cage_tool_create_filter(): set the drawable filter's region to
GIMP_FILTER_REGION_DRAWABLE, fixes offset when there is a selection.
This commit is contained in:
Michael Natterer 2018-08-07 20:05:07 +02:00
parent 0169d48165
commit 49dfc6143d
2 changed files with 4 additions and 0 deletions

View File

@ -288,6 +288,9 @@ gimp_operation_cage_transform_process (GeglOperation *operation,
} }
} }
if (! aux_buf)
return TRUE;
gegl_operation_progress (operation, 0.0, ""); gegl_operation_progress (operation, 0.0, "");
/* pre-allocate memory outside of the loop */ /* pre-allocate memory outside of the loop */

View File

@ -1266,6 +1266,7 @@ gimp_cage_tool_create_filter (GimpCageTool *ct)
_("Cage transform"), _("Cage transform"),
ct->render_node, ct->render_node,
GIMP_ICON_TOOL_CAGE); GIMP_ICON_TOOL_CAGE);
gimp_drawable_filter_set_region (ct->filter, GIMP_FILTER_REGION_DRAWABLE);
g_signal_connect (ct->filter, "flush", g_signal_connect (ct->filter, "flush",
G_CALLBACK (gimp_cage_tool_filter_flush), G_CALLBACK (gimp_cage_tool_filter_flush),