aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-filter-folder-element.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-10-19 15:00:49 +0800
committerMilan Crha <mcrha@redhat.com>2010-10-19 15:00:49 +0800
commit729370ec6386fb990fee328060f36ca75a60a3ac (patch)
tree98b365ea81de5c90753490332b7a2325605cc28c /mail/em-filter-folder-element.c
parentb0fe9d4e45c9174e199c8f3a0b36a4162d87d437 (diff)
downloadgsoc2013-evolution-729370ec6386fb990fee328060f36ca75a60a3ac.tar.gz
gsoc2013-evolution-729370ec6386fb990fee328060f36ca75a60a3ac.tar.zst
gsoc2013-evolution-729370ec6386fb990fee328060f36ca75a60a3ac.zip
Crash on start with vfolders configured
Diffstat (limited to 'mail/em-filter-folder-element.c')
-rw-r--r--mail/em-filter-folder-element.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index 62ce681b34..d5e7bd259a 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);