[gnome-bluetooth] Add some safeguards to the plugins accessors



commit 6ed892f19bc5aef343f97529712d5b08a479a71a
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jun 18 18:04:27 2009 +0100

    Add some safeguards to the plugins accessors

 lib/bluetooth-plugin-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/lib/bluetooth-plugin-manager.c b/lib/bluetooth-plugin-manager.c
index cc78b80..dec614b 100644
--- a/lib/bluetooth-plugin-manager.c
+++ b/lib/bluetooth-plugin-manager.c
@@ -114,6 +114,8 @@ bluetooth_plugin_manager_get_widgets (const char *bdaddr,
 	GList *ret = NULL;
 	GList *l;
 
+	g_return_val_if_fail (bluetooth_verify_address (bdaddr), NULL);
+
 	for (l = plugin_list; l != NULL; l = l->next) {
 		GbtPlugin *p = l->data;
 
@@ -129,6 +131,8 @@ bluetooth_plugin_manager_device_deleted (const char *bdaddr)
 {
 	GList *l;
 
+	g_return_if_fail (bluetooth_verify_address (bdaddr));
+
 	for (l = plugin_list; l != NULL; l = l->next) {
 		GbtPlugin *p = l->data;
 



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