From: Matthias Clasen Date: Mon, 27 Sep 2021 20:40:29 +0000 (-0400) Subject: coloreditor: Don't unref unless we own it X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a107ebdc0d29f7d1413e80c2bec9ca89449aef59;p=gtk4.git coloreditor: Don't unref unless we own it Calling gtk_widget_class_bind_template_child does *not* give you a reference that you need to unref. It manages the reference for you. So calling g_clear_object on such a member is wrong. --- diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c index 85a0c3df0e..84f2fe490b 100644 --- a/gtk/gtkcoloreditor.c +++ b/gtk/gtkcoloreditor.c @@ -447,9 +447,6 @@ gtk_color_editor_dispose (GObject *object) dismiss_current_popup (editor); g_clear_object (&editor->picker); - g_clear_object (&editor->h_adj); - g_clear_object (&editor->s_adj); - g_clear_object (&editor->v_adj); G_OBJECT_CLASS (gtk_color_editor_parent_class)->dispose (object); }