aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--smime/ChangeLog5
-rw-r--r--smime/gui/e-cert-selector.c21
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);
}
}