[evolution] Crash on start with vfolders configured
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Crash on start with vfolders configured
- Date: Tue, 19 Oct 2010 07:01:49 +0000 (UTC)
commit 729370ec6386fb990fee328060f36ca75a60a3ac
Author: Milan Crha <mcrha redhat com>
Date: Tue Oct 19 09:00:49 2010 +0200
Crash on start with vfolders configured
mail/em-filter-folder-element.c | 4 ++++
mail/em-vfolder-rule.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index 62ce681..d5e7bd2 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -34,6 +34,7 @@
#include "em-filter-folder-element.h"
#include "mail/em-folder-selection-button.h"
#include "mail/em-utils.h"
+#include "shell/e-shell.h"
#include "filter/e-filter-part.h"
#include "libedataserver/e-sexp.h"
#include "e-util/e-alert.h"
@@ -70,6 +71,9 @@ static void
filter_folder_element_set_session (EMFilterFolderElement *element,
EMailSession *session)
{
+ if (!session)
+ session = e_mail_backend_get_session (E_MAIL_BACKEND (e_shell_get_backend_by_name (e_shell_get_default(), "mail")));
+
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_return_if_fail (element->priv->session == NULL);
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 36027c1..1bb7830 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -36,6 +36,7 @@
#include "mail/em-utils.h"
#include "mail/em-folder-tree.h"
#include "mail/em-folder-selector.h"
+#include "shell/e-shell.h"
#include "e-util/e-util.h"
#include "e-util/e-alert.h"
@@ -78,6 +79,9 @@ static void
vfolder_rule_set_session (EMVFolderRule *rule,
EMailSession *session)
{
+ if (!session)
+ session = e_mail_backend_get_session (E_MAIL_BACKEND (e_shell_get_backend_by_name (e_shell_get_default(), "mail")));
+
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_return_if_fail (rule->priv->session == NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]