From 02b61966f3a75cf2d70bb3865f6ea44503835e73 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 6 Jul 2016 20:08:20 -0400 Subject: [PATCH] Use g_clear_object The field we are freeing here might be NULL, as pointed out by Cosimo. --- gtk/gtkapplication-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c index a604074b58..db78270488 100644 --- a/gtk/gtkapplication-dbus.c +++ b/gtk/gtkapplication-dbus.c @@ -686,7 +686,7 @@ gtk_application_impl_dbus_finalize (GObject *object) { GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) object; - g_object_unref (dbus->inhibit_proxy); + g_clear_object (&dbus->inhibit_proxy); g_slist_free_full (dbus->inhibit_handles, inhibit_handle_free); g_free (dbus->app_menu_path); g_free (dbus->menubar_path);