Commit 387cc35c authored by Ell's avatar Ell

Issue #1624 - Crashes when using Scissor Select Tool

In GimpTool, always clear tool->drawable upon halting, even for
tools that don't use it explicitly.

GimpTool sets tool->drawable in its default button_press()
implementation, and we potentially access it in
gimp_display_shell_initialize_tool(), so failing to clear it when
halting the tool may leave it as a dangling pointer, which can
result in a segfault when trying to initialize the tool in the
above function.  In particular, this happens with the iscissors
tool.

(cherry picked from commit 58c96f59)
parent aac95860
......@@ -329,7 +329,8 @@ gimp_tool_real_control (GimpTool *tool,
break;
case GIMP_TOOL_ACTION_HALT:
tool->display = NULL;
tool->display = NULL;
tool->drawable = NULL;
break;
case GIMP_TOOL_ACTION_COMMIT:
......
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