[gnome-bluetooth] BluetoothApplet: ensure that ->device_model is valid
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] BluetoothApplet: ensure that ->device_model is valid
- Date: Fri, 17 Dec 2010 17:48:22 +0000 (UTC)
commit 6ba439799e7fedfbc5d2e8f9b64ab3abde8e9b97
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Fri Dec 17 17:44:31 2010 +0100
BluetoothApplet: ensure that ->device_model is valid
Set ->device_model to NULL when ->default_adapter is NULL as well,
so we won't connect signals to it, and won't make wrong assumptions
on it.
https://bugzilla.gnome.org/show_bug.cgi?id=637476
applet/bluetooth-applet.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/applet/bluetooth-applet.c b/applet/bluetooth-applet.c
index a9cb790..74f647f 100644
--- a/applet/bluetooth-applet.c
+++ b/applet/bluetooth-applet.c
@@ -584,6 +584,8 @@ default_adapter_changed (GObject *client,
}
if (self->default_adapter)
self->device_model = bluetooth_client_get_device_model (self->client, self->default_adapter);
+ else
+ self->device_model = NULL;
if (self->device_model) {
self->signal_row_added = g_signal_connect (self->device_model, "row-inserted",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]