[gnome-bluetooth] Fix run-time warning when pairing a new device



commit a6611dcd34a5e018d5481f9e2ae9376fe3664cdb
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Dec 7 14:50:14 2009 +0000

    Fix run-time warning when pairing a new device

 lib/bluetooth-client.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 5fd42d9..8952bbc 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1655,7 +1655,8 @@ gboolean bluetooth_client_create_device (BluetoothClient *client,
 				   err->message);
 			g_error_free (err);
 		}
-		g_object_unref (device);
+		if (device != NULL)
+			g_object_unref (device);
 	}
 
 	devdata = g_try_new0(CreateDeviceData, 1);



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