diff options
author | Peter Williams <peterw@ximian.com> | 2001-07-14 02:06:44 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-07-14 02:06:44 +0800 |
commit | 3209f94b02a3d153df60f83d9595d32348fa7ae6 (patch) | |
tree | bada7ebf6496357e4865b31816d770589002969d /mail | |
parent | a099cf6547610d141567b95681998c7ae6af2633 (diff) | |
download | gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.tar gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.tar.gz gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.tar.bz2 gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.tar.lz gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.tar.xz gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.tar.zst gsoc2013-evolution-3209f94b02a3d153df60f83d9595d32348fa7ae6.zip |
Segfault prevention here if no uid is currently loaded.
2001-07-13 Peter Williams <peterw@ximian.com>
* mail-callbacks.c (expunge_folder): Segfault prevention here if no uid is
currently loaded.
svn path=/trunk/; revision=11093
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 4 | ||||
-rw-r--r-- | mail/mail-callbacks.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index cf7a9a0562..1037c39b7e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,7 +1,7 @@ 2001-07-13 Peter Williams <peterw@ximian.com> - * mail-callbacks.c (expunge_folder): Segfault prevention here if we lose - the race with message_list_set_hidedeleted(). + * mail-callbacks.c (expunge_folder): Segfault prevention here if no uid is + currently loaded. * mail-vfolder.c (unlist_vfolder): New function. If a vfolder in our list gets finalized, NULL out info->folder (Is it wrong if this happens?) Also, 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); |