Commit 22690aba authored by Ell's avatar Ell

Issue #5472 - CRITICAL while using Move tool with arrow keys

In gimp_edit_selection_tool_translate(), perform the active-item
checks even when the effective translation offset is 0, and only
bail afterwards.  This avoids erroneously calling
gimp_tool_message_literal() with a NULL message in this case.

(cherry picked from commit 3a462a5e)
parent 0bf0f31a
Pipeline #200103 passed with stages
in 27 minutes and 58 seconds
......@@ -1084,8 +1084,6 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
0);
if (inc_x != 0 || inc_y != 0)
{
switch (translate_type)
{
case GIMP_TRANSFORM_TYPE_SELECTION:
......@@ -1184,7 +1182,6 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
case GIMP_TRANSFORM_TYPE_IMAGE:
g_return_val_if_reached (FALSE);
}
}
if (! item)
{
......@@ -1200,6 +1197,9 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
return TRUE;
}
if (inc_x == 0 && inc_y == 0)
return TRUE;
switch (edit_mode)
{
case GIMP_TRANSLATE_MODE_FLOATING_SEL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment