[gnome-bluetooth] lib: Remove spurious weak pointer reference to bluetooth agent



commit 33bc7049198d44c51b05748f46393c8ff5180a3c
Author: Benjamin Berg <bberg redhat com>
Date:   Wed Nov 22 18:17:33 2017 +0100

    lib: Remove spurious weak pointer reference to bluetooth agent
    
    The bluetooth widget holds a single reference to the agent object. This
    reference is unref'ed and cleared using g_object_cleared() in all relevant
    cases.
    
    This pointer should not be a weak reference. It will not cause issues
    simply because agent will always be destroyed at the same time as the
    widget.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790720

 lib/bluetooth-settings-widget.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index f6f5418..2472ae1 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1808,8 +1808,6 @@ setup_pairing_agent (BluetoothSettingsWidget *self)
                return;
        }
 
-       g_object_add_weak_pointer (G_OBJECT (priv->agent), (gpointer *) (&priv->agent));
-
        bluetooth_agent_set_pincode_func (priv->agent, pincode_callback, self);
        bluetooth_agent_set_passkey_func (priv->agent, passkey_callback, self);
        bluetooth_agent_set_display_func (priv->agent, display_callback, self);


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