aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimon.zheng <simon.zheng@sun.com>2007-04-09 10:38:31 +0800
committerSimon Zheng <simonz@src.gnome.org>2007-04-09 10:38:31 +0800
commit2bf374941d64d2eabded23db96d6d250e4c219eb (patch)
tree41025b9934ed1b8d5ff95900992df758c3fbcf34
parent59c2bb385752f8de99e6fe0b2e2946094f42322f (diff)
downloadgsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.tar
gsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.tar.gz
gsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.tar.bz2
gsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.tar.lz
gsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.tar.xz
gsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.tar.zst
gsoc2013-evolution-2bf374941d64d2eabded23db96d6d250e4c219eb.zip
** Fix for bug #426829.
2007-04-09 simon.zheng <simon.zheng@sun.com> ** Fix for bug #426829. * gui/contact-editor/eab-editor.c: (eab_editor_confirm_delete): * gui/widgets/eab-contact-display.c: (render_contact): To avoid printing a NULL char point, adding statements to check the return result of et_email_location() and e_contact_get(). svn path=/branches/gnome-2-18/; revision=33399
-rw-r--r--addressbook/ChangeLog9
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c4
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c3
3 files changed, 13 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index ce5bd72131..a8d44ff84e 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-09 simon.zheng <simon.zheng@sun.com>
+
+ ** Fix for bug #426829.
+
+ * gui/contact-editor/eab-editor.c: (eab_editor_confirm_delete):
+ * gui/widgets/eab-contact-display.c: (render_contact):
+ To avoid printing a NULL char point, add statements to
+ check the return result of et_email_location() and e_contact_get().
+
2007-04-05 Matthew Barnes <mbarnes@redhat.com>
* gui/component/addressbook-config.c (addressbook_config_edit_source):
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index c6f45a260c..4be33c34c7 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -320,7 +320,7 @@ eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list,
/* contact list(s) */
if (!plural)
msg = g_strdup_printf (_("Are you sure you want\nto delete contact list (%s)?"),
- name);
+ name?name:"");
else
msg = g_strdup (_("Are you sure you want\nto delete these contact lists?"));
}
@@ -328,7 +328,7 @@ eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list,
/* contact(s) */
if (!plural)
msg = g_strdup_printf (_("Are you sure you want\nto delete contact (%s)?"),
- name);
+ name?name:"");
else
msg = g_strdup (_("Are you sure you want\nto delete these contacts?"));
}
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 470356d3b9..b2425048dd 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -518,7 +518,8 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) {
#ifdef HANDLE_MAILTO_INTERNALLY
char *html = e_text_to_html (l->data, 0);
- g_string_append_printf (accum, "%s<a href=\"internal-mailto:%d\">%s</a> <font color=" HEADER_COLOR ">(%s)</font>", nl, email_num, html, get_email_location ((EVCardAttribute *) al->data));
+ char *attr_str = get_email_location ((EVCardAttribute *) al->data);
+ g_string_append_printf (accum, "%s<a href=\"internal-mailto:%d\">%s</a> <font color=" HEADER_COLOR ">(%s)</font>", nl, email_num, html, attr_str?attr_str:"");
email_num ++;
g_free (html);
nl = "<br>";