[gtk/gtk-4-4] coloreditor: Don't unref unless we own it
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-4] coloreditor: Don't unref unless we own it
- Date: Sun, 31 Oct 2021 21:52:13 +0000 (UTC)
commit a107ebdc0d29f7d1413e80c2bec9ca89449aef59
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 27 16:40:29 2021 -0400
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.
gtk/gtkcoloreditor.c | 3 ---
1 file changed, 3 deletions(-)
---
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]