gnome-bluetooth r566 - trunk/common



Author: hadess
Date: Fri Apr  3 17:57:23 2009
New Revision: 566
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=566&view=rev

Log:
Avoid possible warnings or crashes when GetProperties fails on a device


Modified:
   trunk/common/bluetooth-client.c

Modified: trunk/common/bluetooth-client.c
==============================================================================
--- trunk/common/bluetooth-client.c	(original)
+++ trunk/common/bluetooth-client.c	Fri Apr  3 17:57:23 2009
@@ -503,15 +503,9 @@
 		value = g_hash_table_lookup(hash, "Connected");
 		connected = value ? g_value_get_boolean(value) : FALSE;
 	} else {
-		address = NULL;
-		alias = NULL;
-		name = NULL;
-		type = BLUETOOTH_TYPE_ANY;
-		icon = NULL;
-		rssi = 0;
-		paired = FALSE;
-		trusted = FALSE;
-		connected = FALSE;
+		if (device)
+			g_object_unref (device);
+		return;
 	}
 
 	cont = gtk_tree_model_iter_children(GTK_TREE_MODEL(priv->store),



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