[gnome-bluetooth] Add some safeguards to the plugins accessors
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-bluetooth] Add some safeguards to the plugins accessors
- Date: Thu, 18 Jun 2009 13:10:23 -0400 (EDT)
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]