From 1f774bc1de184f4bcb525d4e5b260d4391bb4c4a Mon Sep 17 00:00:00 2001 From: "Gustavo F. Padovan" Date: Tue, 27 Sep 2011 18:04:20 -0300 Subject: [PATCH] sap: fix sap modem remove prefix NULL means that the modem needs to be removed --- plugins/sap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sap.c b/plugins/sap.c index b679ce5f..574031ab 100644 --- a/plugins/sap.c +++ b/plugins/sap.c @@ -234,13 +234,13 @@ static void bluetooth_sap_remove(const char *prefix) DBG("%s", prefix); - if (modem_hash == NULL || prefix == NULL) + if (modem_hash == NULL) return; g_hash_table_iter_init(&iter, modem_hash); while (g_hash_table_iter_next(&iter, &key, &value)) { - if (g_str_has_prefix((char *)key, prefix) == FALSE) + if (prefix && g_str_has_prefix((char *)key, prefix) == FALSE) continue; g_hash_table_iter_remove(&iter);