mirror of https://github.com/GNOME/gimp.git
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 ec80a88513
, 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().
This commit is contained in:
parent
5dcee9ad37
commit
072d6b0d12
|
@ -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),
|
||||
filter_tool);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_filter_tool_dialog_unmap (GtkWidget *dialog,
|
||||
GimpFilterTool *filter_tool)
|
||||
{
|
||||
gimp_filter_tool_disable_color_picking (filter_tool);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue