From 2af5aa651a87e5bcd6455b8eb34a9cddbed4b3f3 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Fri, 20 Feb 2026 02:48:05 +0000 Subject: [PATCH] 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. --- app/tools/gimppathtool.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/tools/gimppathtool.c b/app/tools/gimppathtool.c index 2566257060..f492a9d62f 100644 --- a/app/tools/gimppathtool.c +++ b/app/tools/gimppathtool.c @@ -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,