aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-browser.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-folder-browser.c')
-rw-r--r--mail/em-folder-browser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index e61453e8ce..e9c14ea600 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -556,8 +556,9 @@ static void
emfb_folder_expunge(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderBrowser *emfb = data;
-
- em_utils_expunge_folder(gtk_widget_get_toplevel((GtkWidget *)emfb), emfb->view.folder);
+
+ if (emfb->view.folder)
+ em_utils_expunge_folder(gtk_widget_get_toplevel((GtkWidget *)emfb), emfb->view.folder);
}
static void
@@ -722,6 +723,7 @@ static const EMFolderViewEnable emfb_enable_map[] = {
{ "EditInvertSelection", EM_POPUP_SELECT_FOLDER },
{ "EditSelectAll", EM_POPUP_SELECT_FOLDER },
{ "EditSelectThread", EM_FOLDER_VIEW_SELECT_THREADED },
+ { "FolderExpunge", EM_POPUP_SELECT_FOLDER },
{ "MailPost", EM_POPUP_SELECT_FOLDER },
{ "MessageMarkAllAsRead", EM_POPUP_SELECT_FOLDER },
{ "ViewHideSelected", EM_POPUP_SELECT_MANY },