summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Reitter <travis.reitter@collabora.co.uk>2011-06-21 15:08:45 -0700
committerTravis Reitter <travis.reitter@collabora.co.uk>2011-06-21 15:36:17 -0700
commit3c5ebf360d0dd934928683f6d1ee41c6ba106e91 (patch)
tree50a448e81a54b3ca9e95d697a9dccda70a2e8545
parentd7514bc4c8d2772bb7d8e6f0baa6bb5407ab7f0c (diff)
Don't crash if a provided TpContact ID is NULL.
-rw-r--r--tests/lib/telepathy/contactlist/conn.c4
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");