tools: Don't disconnect rasterized layer signals
In the path tool, when setting a new vector layer as the editable path, we try to disconnect the old signal for gimp_path_tool_vector_layer_path_changed () from the vector layer options. However, if this code is triggered because we rasterized the vector layer while the path tool was active, it will throw a warning because the layer options are NULL. This patch adds a check to make sure the options exist before trying to disconnect their "notify::path" signal.
This commit is contained in:
parent
4bfa65d72d
commit
2af5aa651a
1 changed files with 5 additions and 3 deletions
|
|
@ -991,9 +991,11 @@ gimp_path_tool_set_layer (GimpPathTool *path_tool,
|
|||
if (path_tool->current_vector_layer)
|
||||
{
|
||||
layer_options = gimp_vector_layer_get_options (path_tool->current_vector_layer);
|
||||
g_signal_handlers_disconnect_by_func (layer_options,
|
||||
gimp_path_tool_vector_layer_path_changed,
|
||||
path_tool);
|
||||
|
||||
if (layer_options)
|
||||
g_signal_handlers_disconnect_by_func (layer_options,
|
||||
gimp_path_tool_vector_layer_path_changed,
|
||||
path_tool);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (options,
|
||||
gimp_path_tool_vector_change_notify,
|
||||
|
|
|
|||
Loading…
Reference in a new issue