From 3209f94b02a3d153df60f83d9595d32348fa7ae6 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Fri, 13 Jul 2001 18:06:44 +0000 Subject: Segfault prevention here if no uid is currently loaded. 2001-07-13 Peter Williams * mail-callbacks.c (expunge_folder): Segfault prevention here if no uid is currently loaded. svn path=/trunk/; revision=11093 --- mail/mail-callbacks.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 8e97ac6963..2f0269caf7 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1653,10 +1653,12 @@ expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path) /* Only blank the mail display if the message being viewed is one of those to be expunged */ - /* We have a race here if the above hidedeleted hides loaded_uid */ - info = camel_folder_get_message_info (fb->folder, fb->loaded_uid); - if (info && info->flags & CAMEL_MESSAGE_DELETED) - mail_display_set_message (fb->mail_display, NULL); + if (fb->loaded_uid) { + info = camel_folder_get_message_info (fb->folder, fb->loaded_uid); + + if (info && info->flags & CAMEL_MESSAGE_DELETED) + mail_display_set_message (fb->mail_display, NULL); + } fb->expunging = fb->folder; mail_expunge_folder (fb->folder, expunged_folder, data); -- cgit