app: fix warning when a gegl op's aux input combo box gets destroyed

gimp_operation_tool_aux_selected() is called with a NULL drawable
when the combo is destroyed, but at that time the GeglNode we set
the buffer on is already gone. Instead of adding evil if()s,
connect_object() the combo's "select-item" signal to the node
instead of the tool, so it gets disconnected automatically.
This commit is contained in:
Michael Natterer 2013-08-25 22:41:43 +02:00
parent 05646749f5
commit 28c9470d5f
1 changed files with 3 additions and 3 deletions

View File

@ -467,14 +467,14 @@ static gboolean
gimp_operation_tool_aux_selected (GimpContainerView *view,
GimpViewable *viewable,
gpointer insert_data,
GimpOperationTool *tool)
GeglNode *aux_input)
{
GeglBuffer *buffer = NULL;
if (viewable)
buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (viewable));
gegl_node_set (tool->aux_input,
gegl_node_set (aux_input,
"buffer", buffer,
NULL);
@ -571,7 +571,7 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
g_signal_connect_object (tool->aux_input_combo, "select-item",
G_CALLBACK (gimp_operation_tool_aux_selected),
tool, 0);
tool->aux_input, 0);
channel = gimp_image_get_active_channel (image);