diff options
author | Not Zed <NotZed@Ximian.com> | 2004-10-12 10:27:04 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-12 10:27:04 +0800 |
commit | 567688b263b9dc5e5d3278c85f3b6f5ae981b8e1 (patch) | |
tree | e1b619a3def3dbcd558cea8dee04aa142569eb76 /smime | |
parent | a55c6f5e5d6e3d23f5a407a29e56ecc27682b2e9 (diff) | |
download | gsoc2013-evolution-567688b263b9dc5e5d3278c85f3b6f5ae981b8e1.tar.gz gsoc2013-evolution-567688b263b9dc5e5d3278c85f3b6f5ae981b8e1.tar.zst gsoc2013-evolution-567688b263b9dc5e5d3278c85f3b6f5ae981b8e1.zip |
dont try to deference NULL nickname or emailAddr on the cert.
2004-10-11 Not Zed <NotZed@Ximian.com>
* gui/e-cert-selector.c (e_cert_selector_new): dont try to
deference NULL nickname or emailAddr on the cert.
svn path=/trunk/; revision=27542
Diffstat (limited to 'smime')
-rw-r--r-- | smime/ChangeLog | 5 | ||||
-rw-r--r-- | smime/gui/e-cert-selector.c | 21 |
2 files changed, 17 insertions, 9 deletions
diff --git a/smime/ChangeLog b/smime/ChangeLog index b832cc3a63..3eacf85e25 100644 --- a/smime/ChangeLog +++ b/smime/ChangeLog @@ -1,3 +1,8 @@ +2004-10-11 Not Zed <NotZed@Ximian.com> + + * gui/e-cert-selector.c (e_cert_selector_new): dont try to + deference NULL nickname or emailAddr on the cert. + 2004-09-03 Not Zed <NotZed@Ximian.com> ** See bug #64420. diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c index 31cfcdc1a2..881c4da76a 100644 --- a/smime/gui/e-cert-selector.c +++ b/smime/gui/e-cert-selector.c @@ -185,16 +185,19 @@ e_cert_selector_new(int type, const char *currentid) if (certlist != NULL) { node = CERT_LIST_HEAD(certlist); while (!CERT_LIST_END(node, certlist)) { - w = gtk_menu_item_new_with_label(node->cert->nickname); - gtk_menu_shell_append((GtkMenuShell *)menu, w); - gtk_widget_show(w); + if (node->cert->nickname || node->cert->emailAddr) { + w = gtk_menu_item_new_with_label(node->cert->nickname?node->cert->nickname:node->cert->emailAddr); + gtk_menu_shell_append((GtkMenuShell *)menu, w); + gtk_widget_show(w); + + if (currentid != NULL + && ((node->cert->nickname != NULL && strcmp(node->cert->nickname, currentid) == 0) + || (node->cert->emailAddr != NULL && strcmp(node->cert->emailAddr, currentid) == 0))) + active = n; + + n++; + } - if (currentid != NULL - && (strcmp(node->cert->nickname, currentid) == 0 - || strcmp(node->cert->emailAddr, currentid) == 0)) - active = n; - - n++; node = CERT_LIST_NEXT(node); } } |