[gtk+/portal] Use g_clear_object



commit 02b61966f3a75cf2d70bb3865f6ea44503835e73
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 6 20:08:20 2016 -0400

    Use g_clear_object
    
    The field we are freeing here might be NULL, as pointed
    out by Cosimo.

 gtk/gtkapplication-dbus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplication-dbus.c b/gtk/gtkapplication-dbus.c
index a604074..db78270 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]