aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-tree.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 47323f0138..9acda651d8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-26 Mengjie Yu <meng-jie.yu@sun.com>
+
+ Fixes #71774
+ * em-folder-tree.c: (emft_popup_rename_folder):
+ we should check whether the 'new_name' is a NULL pointer to avoid
+ Evolution crashes.
+
2005-01-25 Mengjie Yu <meng-jie.yu@sun.com>
* em-mailer-prefs.c: (restore_labels_clicked),
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 4375b9bcc0..d8741e0c71 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2672,13 +2672,13 @@ emft_popup_rename_folder (EPopup *ep, EPopupItem *pitem, void *data)
prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), name);
while (!done) {
new_name = e_request_string (NULL, _("Rename Folder"), prompt, name);
- if (strchr(new_name, '/') != NULL) {
+ if (new_name == NULL || !strcmp (name, new_name)) {
+ /* old name == new name */
+ done = TRUE;
+ } else if (strchr(new_name, '/') != NULL) {
e_error_run((GtkWindow *)gtk_widget_get_toplevel((GtkWidget *)emft),
"mail:no-rename-folder", name, new_name, _("Folder names cannot contain '/'"), NULL);
done = TRUE;
- } else if (new_name == NULL || !strcmp (name, new_name)) {
- /* old name == new name */
- done = TRUE;
} else {
CamelFolderInfo *fi;
CamelException ex;