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.
This commit is contained in:
Ell 2020-03-05 18:56:08 +02:00
parent 34f00e8a7a
commit 11efe64736
1 changed files with 6 additions and 0 deletions

View File

@ -1384,6 +1384,12 @@ gimp_transform_grid_tool_response (GimpToolGui *gui,
GimpTransformGridOptions *tg_options = GIMP_TRANSFORM_GRID_TOOL_GET_OPTIONS (tg_tool); GimpTransformGridOptions *tg_options = GIMP_TRANSFORM_GRID_TOOL_GET_OPTIONS (tg_tool);
GimpDisplay *display = tool->display; 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) switch (response_id)
{ {
case RESPONSE_RESET: case RESPONSE_RESET: