Commit e486537c authored by Ell's avatar Ell

Issue #1613 - foreground select tool raises a CRITICAL when committing

Make gimp_free_select_tool_halt() protected, and call it in
gimp_foreground_select_tool_set_trimap(), so that the free-select
subobject of the foreground-select tool is properly shut down
before switching to trimap mode.  In particular, this clears the
free-select tool widget at the right point; failing to do this
leads to CRITICALs later on.

(cherry picked from commit e1573323)
parent 08294f9e
......@@ -1025,6 +1025,8 @@ gimp_foreground_select_tool_set_trimap (GimpForegroundSelectTool *fg_select)
gimp_free_select_tool_halt (GIMP_FREE_SELECT_TOOL (fg_select));
gimp_foreground_select_options_get_mask_color (options, &color);
gimp_display_shell_set_mask (gimp_display_get_shell (tool->display),
fg_select->trimap, 0, 0, &color, TRUE);
......@@ -233,7 +233,7 @@ gimp_free_select_tool_start (GimpFreeSelectTool *fst,
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);
static void
gimp_free_select_tool_halt (GimpFreeSelectTool *fst)
GimpFreeSelectToolPrivate *private = fst->private;
......@@ -61,5 +61,9 @@ GType gimp_free_select_tool_get_type (void) G_GNUC_CONST;
gint gimp_free_select_tool_get_n_points (GimpFreeSelectTool *tool);
/* protected functions */
void gimp_free_select_tool_halt (GimpFreeSelectTool *tool);
#endif /* __GIMP_FREE_SELECT_TOOL_H__ */
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