[gnome-keyring] gpg-agent: Fix assertion when cancelling prompt
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] gpg-agent: Fix assertion when cancelling prompt
- Date: Fri, 10 Feb 2012 07:48:27 +0000 (UTC)
commit cec5188c5a4276705d719134f91fe0552579b629
Author: Stef Walter <stefw gnome org>
Date: Fri Feb 10 08:47:16 2012 +0100
gpg-agent: Fix assertion when cancelling prompt
* Assertion when cancelling a password prompt because
of null GError. Ignore null errors
daemon/gpg-agent/gkd-gpg-agent-ops.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gpg-agent/gkd-gpg-agent-ops.c b/daemon/gpg-agent/gkd-gpg-agent-ops.c
index afca811..453ac89 100644
--- a/daemon/gpg-agent/gkd-gpg-agent-ops.c
+++ b/daemon/gpg-agent/gkd-gpg-agent-ops.c
@@ -422,7 +422,7 @@ do_get_password (GckSession *session, const gchar *keyid, const gchar *errmsg,
if (prompt != NULL) {
password = egg_secure_strdup (gcr_prompt_password (prompt, NULL, &error));
if (password == NULL) {
- if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ if (error && !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
g_warning ("couldn't prompt for password: %s", egg_error_message (error));
g_clear_error (&error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]