Commit c7a5195b authored by Martin Nordholts's avatar Martin Nordholts Committed by Sven Neumann

Bug 604078 - Crash when pressing Backspace with Free Select Tool

Make sure we never call gimp_free_select_tool_remove_last_segment()
with priv->n_segment_indices being negative, and increase robustness
of the code in general.

Note that we always halt the tool when backspace is pressed and there
are no vertices left. This is to minimize the risk of ending up in an
invalid tool state.
parent b7ae59e9
......@@ -485,9 +485,10 @@ gimp_free_select_tool_remove_last_segment (GimpFreeSelectTool *fst)
gimp_draw_tool_pause (draw_tool);
if (priv->n_segment_indices > 0)
if (priv->n_segment_indices == 0)
if (priv->n_segment_indices <= 0)
gimp_free_select_tool_halt (fst);
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