summaryrefslogtreecommitdiff
path: root/src/gtkext/gtkdisplaypanel.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-08 22:37:28 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-08 22:37:28 (GMT)
commit89d41f2629b9d98069fa7c1db70821a14da57523 (patch)
treee573172068f9a8ee50eaf4028b9cd55f404a6717 /src/gtkext/gtkdisplaypanel.c
parent8b17768e12ac797e06b5829ee4a4b9ab8da78954 (diff)
Fixed reference counting when switching panels.
Diffstat (limited to 'src/gtkext/gtkdisplaypanel.c')
-rw-r--r--src/gtkext/gtkdisplaypanel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gtkext/gtkdisplaypanel.c b/src/gtkext/gtkdisplaypanel.c
index 0c3a6b9..4b21d8c 100644
--- a/src/gtkext/gtkdisplaypanel.c
+++ b/src/gtkext/gtkdisplaypanel.c
@@ -231,8 +231,7 @@ static void gtk_display_panel_loaded_interface_init(GLoadedPanelInterface *iface
static void gtk_display_panel_dispose(GtkDisplayPanel *panel)
{
- if (panel->options != NULL)
- g_object_unref(G_OBJECT(panel->options));
+ g_clear_object(&panel->options);
G_OBJECT_CLASS(gtk_display_panel_parent_class)->dispose(G_OBJECT(panel));