summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2013-08-07 19:29:15 +0200
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2013-08-08 09:26:44 +0200
commita243fdeec4e1f6cb2aff0e7a821fd167f21932bf (patch)
treee19c0110c12d6e89308e500adaac0eca89650c69
parent1fc5a6fccf25ed44d39837125916f5282bf80abb (diff)
Don't dereference a NULL error
libsecret returns FALSE without an error in some cases but we unconditionally dereference it, causing a crash. https://bugzilla.gnome.org/show_bug.cgi?id=692105
-rw-r--r--libempathy/empathy-keyring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libempathy/empathy-keyring.c b/libempathy/empathy-keyring.c
index 837b2d51..09ab4dd1 100644
--- a/libempathy/empathy-keyring.c
+++ b/libempathy/empathy-keyring.c
@@ -664,7 +664,8 @@ items_delete_cb (GObject *source,
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (user_data);
GError *error = NULL;
- if (!secret_password_clear_finish (result, &error))
+ secret_password_clear_finish (result, &error);
+ if (error != NULL)
{
g_simple_async_result_set_error (simple, TP_ERROR,
TP_ERROR_DOES_NOT_EXIST, "%s", error->message);