Re: [evolution-patches] fix for crash on expunge when store node selected



committed
On Fri, 2004-07-09 at 13:43 +0800, Not Zed wrote:

as reported on the evolution list (i'm trying to find a bug number for it, but it might not be in our bugzilla).

pretty simple fix.

2004-07-09  Not Zed  <NotZed Ximian com>

	* em-folder-browser.c (emfb_folder_expunge): only call expunge if
	the folder is set.
	(emfb_enable_map[]): only enable expunge menu item if we have a
	valid folder set.

--
Michael Zucchi <notzed ximian com>

Novell's Evolution and Free Software Developer
Plain text document attachment (mail-expunge.diff)
Index: mail/em-folder-browser.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-browser.c,v
retrieving revision 1.49
diff -u -3 -r1.49 em-folder-browser.c
--- mail/em-folder-browser.c	17 Jun 2004 07:34:49 -0000	1.49
+++ mail/em-folder-browser.c	9 Jul 2004 05:43:59 -0000
@@ -556,8 +556,9 @@
 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 @@
 	{ "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 },
--
Michael Zucchi <notzed ximian com>

Novell's Evolution and Free Software Developer


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]