aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMengjie Yu <meng-jie.yu@sun.com>2005-01-27 15:05:56 +0800
committerHarry Lu <haip@src.gnome.org>2005-01-27 15:05:56 +0800
commit17f3cc69943b594c9a28923ed7d076a8b3224bfe (patch)
treeb6ab58469c1d93ae6447c6c94de470599b0032d9 /mail
parentcdbb677db1362c6b75330612bc97ed876df1cc9e (diff)
downloadgsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar
gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar.gz
gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar.bz2
gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar.lz
gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar.xz
gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar.zst
gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.zip
Fixes #71774 we should check whether the 'new_name' is a NULL pointer to
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. svn path=/trunk/; revision=28574
Diffstat (limited to 'mail')
-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;