diff options
author | Mengjie Yu <meng-jie.yu@sun.com> | 2005-01-27 15:05:56 +0800 |
---|---|---|
committer | Harry Lu <haip@src.gnome.org> | 2005-01-27 15:05:56 +0800 |
commit | 17f3cc69943b594c9a28923ed7d076a8b3224bfe (patch) | |
tree | b6ab58469c1d93ae6447c6c94de470599b0032d9 | |
parent | cdbb677db1362c6b75330612bc97ed876df1cc9e (diff) | |
download | gsoc2013-evolution-17f3cc69943b594c9a28923ed7d076a8b3224bfe.tar.gz 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
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 8 |
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; |