mirror of https://github.com/GNOME/gimp.git
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/gimpbycolorselect.c: fix crash when changing threshold with no display active.
This commit is contained in:
parent
ab22402033
commit
c1d109da12
|
@ -1,3 +1,8 @@
|
|||
2006-06-14 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* app/tools/gimpbycolorselect.c: fix crash when changing
|
||||
threshold with no display active.
|
||||
|
||||
2006-06-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/actions/image-actions.c: use radio items for the Image mode
|
||||
|
|
|
@ -138,6 +138,8 @@ gimp_by_color_select_tool_constructor (GType type,
|
|||
|
||||
tool = GIMP_TOOL (object);
|
||||
|
||||
tool->display = NULL;
|
||||
|
||||
options = G_OBJECT (tool->tool_info->tool_options);
|
||||
g_signal_connect_object (options, "notify::threshold",
|
||||
G_CALLBACK (gimp_by_color_select_tool_threshold_notify),
|
||||
|
@ -154,6 +156,8 @@ gimp_by_color_select_tool_dispose (GObject *object)
|
|||
|
||||
options = G_OBJECT (tool->tool_info->tool_options);
|
||||
|
||||
tool->display = NULL;
|
||||
|
||||
g_signal_handlers_disconnect_by_func
|
||||
(options,
|
||||
G_CALLBACK (gimp_by_color_select_tool_threshold_notify),
|
||||
|
@ -285,11 +289,12 @@ gimp_by_color_select_tool_threshold_notify (GimpSelectionOptions *options,
|
|||
GimpUndo *undo = by_color_sel->undo;
|
||||
|
||||
display = tool->display;
|
||||
image = display->image;
|
||||
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
image = display->image;
|
||||
|
||||
/* don't do anything unless we have already done something */
|
||||
if (!undo)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue