[gnome-bluetooth] lib: Fix possible crash if there's no default adapter



commit 63efba0b584890df57c228fe54e2cdf0f4815dae
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 4 03:30:23 2013 +0200

    lib: Fix possible crash if there's no default adapter
    
    Or it's already been unset.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706924

 lib/bluetooth-client.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 4081f66..0130aff 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1098,7 +1098,7 @@ static void bluetooth_client_finalize(GObject *client)
 
        g_object_unref(priv->store);
 
-       gtk_tree_row_reference_free (priv->default_adapter);
+       g_clear_pointer (&priv->default_adapter, gtk_tree_row_reference_free);
 
        G_OBJECT_CLASS(bluetooth_client_parent_class)->finalize(client);
 }


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