aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-24 03:58:30 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-24 03:58:30 +0800
commita46817359ee58ef7772f140816ee6fbc979b2bda (patch)
treec64630322e0e9221b5f4726085b1d3410231d2f3
parent82c5c5915254d42b1a3ab34aa9b1a841ea41b56e (diff)
downloadgsoc2013-evolution-a46817359ee58ef7772f140816ee6fbc979b2bda.tar.gz
gsoc2013-evolution-a46817359ee58ef7772f140816ee6fbc979b2bda.tar.zst
gsoc2013-evolution-a46817359ee58ef7772f140816ee6fbc979b2bda.zip
Protect against NULL uids. (emmb_set_message): Same.
2004-02-23 Jeffrey Stedfast <fejj@ximian.com> * em-message-browser.c (emmb_list_message_selected): Protect against NULL uids. (emmb_set_message): Same. svn path=/trunk/; revision=24834
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/em-message-browser.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2e2e059c6f..8c46a6e0a8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2004-02-23 Jeffrey Stedfast <fejj@ximian.com>
+ * em-message-browser.c (emmb_list_message_selected): Protect
+ against NULL uids.
+ (emmb_set_message): Same.
+
* em-format-quote.c (emfq_format_message): Print the headers when
forwarding inline/quoted. Fixes bug #53916.
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
index a23e872b6a..4050f0b9ea 100644
--- a/mail/em-message-browser.c
+++ b/mail/em-message-browser.c
@@ -160,7 +160,7 @@ emmb_list_message_selected (struct _MessageList *ml, const char *uid, EMMessageB
EMFolderView *emfv = (EMFolderView *) emmb;
CamelMessageInfo *info;
- if ((info = camel_folder_get_message_info (emfv->folder, uid))) {
+ if (uid && (info = camel_folder_get_message_info (emfv->folder, uid))) {
gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
gtk_widget_grab_focus ((GtkWidget *) (emmb->view.preview->formathtml.html));
camel_folder_free_message_info (emfv->folder, info);
@@ -233,6 +233,9 @@ emmb_set_message(EMFolderView *emfv, const char *uid)
emmb_parent->set_message(emfv, uid);
+ if (uid == NULL)
+ return;
+
if ((info = camel_folder_get_message_info (emfv->folder, uid))) {
gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
camel_folder_free_message_info (emfv->folder, info);