aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-message-browser.c
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 /mail/em-message-browser.c
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
Diffstat (limited to 'mail/em-message-browser.c')
-rw-r--r--mail/em-message-browser.c5
1 files changed, 4 insertions, 1 deletions
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);