[folks] Don't crash if a provided TpContact ID is NULL.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Don't crash if a provided TpContact ID is NULL.
- Date: Tue, 21 Jun 2011 22:40:36 +0000 (UTC)
commit 3c5ebf360d0dd934928683f6d1ee41c6ba106e91
Author: Travis Reitter <travis reitter collabora co uk>
Date: Tue Jun 21 15:08:45 2011 -0700
Don't crash if a provided TpContact ID is NULL.
tests/lib/telepathy/contactlist/conn.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/lib/telepathy/contactlist/conn.c b/tests/lib/telepathy/contactlist/conn.c
index 7a15121..748abef 100644
--- a/tests/lib/telepathy/contactlist/conn.c
+++ b/tests/lib/telepathy/contactlist/conn.c
@@ -178,7 +178,7 @@ tp_test_contact_list_normalize_contact (TpHandleRepoIface *repo,
gpointer context,
GError **error)
{
- if (id[0] == '\0')
+ if (id == NULL || id[0] == '\0')
{
g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
"Contact ID must not be empty");
@@ -194,7 +194,7 @@ tp_test_contact_list_normalize_group (TpHandleRepoIface *repo,
gpointer context,
GError **error)
{
- if (id[0] == '\0')
+ if (id == NULL || id[0] == '\0')
{
g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
"Contact group name cannot be empty");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]