Commit 072d6b0d authored by Ell's avatar Ell

Issue #2120 - Segmentation fault while using Levels to white balance a layer

Move the call to gimp_filter_tool_disable_color_picking() from the
filter-tool's dialog "unmap" handler to gimp_filter_tool_halt().
Since commit ec80a885, we
explicitly destroy the GUI when halting the filter tool, which
happens before the dialog's unmap handler is called, which could
potentially result in a dangling pointer to the active color-picker
widget in gimp_filter_tool_disable_color_picking().
parent 5dcee9ad
......@@ -149,8 +149,6 @@ static void gimp_filter_tool_halt (GimpFilterTool *filter_to
static void gimp_filter_tool_commit (GimpFilterTool *filter_tool);
static void gimp_filter_tool_dialog (GimpFilterTool *filter_tool);
static void gimp_filter_tool_dialog_unmap (GtkWidget *dialog,
GimpFilterTool *filter_tool);
static void gimp_filter_tool_reset (GimpFilterTool *filter_tool);
static void gimp_filter_tool_create_filter (GimpFilterTool *filter_tool);
......@@ -937,6 +935,8 @@ gimp_filter_tool_halt (GimpFilterTool *filter_tool)
GimpTool *tool = GIMP_TOOL (filter_tool);
gimp_filter_tool_disable_color_picking (filter_tool);
if (filter_tool->gui)
/* explicitly clear the dialog contents first, since we might be called
......@@ -1026,17 +1026,6 @@ static void
gimp_filter_tool_dialog (GimpFilterTool *filter_tool)
GIMP_FILTER_TOOL_GET_CLASS (filter_tool)->dialog (filter_tool);
g_signal_connect (gimp_tool_gui_get_dialog (filter_tool->gui), "unmap",
G_CALLBACK (gimp_filter_tool_dialog_unmap),
static void
gimp_filter_tool_dialog_unmap (GtkWidget *dialog,
GimpFilterTool *filter_tool)
gimp_filter_tool_disable_color_picking (filter_tool);
static void
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