[gimp/gimp-2-10] Issue #1624 - Crashes when using Scissor Select Tool
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #1624 - Crashes when using Scissor Select Tool
- Date: Fri, 15 Jun 2018 12:20:43 +0000 (UTC)
commit 387cc35c588867a52349839b049994c921ae8ef7
Author: Ell <ell_se yahoo com>
Date: Fri Jun 15 08:08:13 2018 -0400
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 58c96f596e588a0d123d71fec282b207e7f45635)
app/tools/gimptool.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/app/tools/gimptool.c b/app/tools/gimptool.c
index c4d3563cea..0d177cdb0b 100644
--- a/app/tools/gimptool.c
+++ b/app/tools/gimptool.c
@@ -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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]