aboutsummaryrefslogtreecommitdiff
path: root/libsylph/filter.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-01-17 09:09:39 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-01-17 09:09:39 +0000
commita180370d2eb17006ef9b3df030445a30de6c2c89 (patch)
tree853eb20be82d45e66efcbff53432880442216423 /libsylph/filter.c
parent191e20dbe4ce6118718ef0b3182219b56e560300 (diff)
fixed IMAP4 filtering when IP unreachable.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1493 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/filter.c')
-rw-r--r--libsylph/filter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libsylph/filter.c b/libsylph/filter.c
index e33c3554..c7f60f29 100644
--- a/libsylph/filter.c
+++ b/libsylph/filter.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -100,6 +100,8 @@ gint filter_apply_msginfo(GSList *fltlist, MsgInfo *msginfo,
if (!fltlist) return 0;
file = procmsg_get_message_file(msginfo);
+ if (!file)
+ return -1;
hlist = procheader_get_header_list_from_file(file);
if (!hlist) {
g_free(file);
@@ -367,6 +369,8 @@ static gboolean filter_match_cond(FilterCond *cond, MsgInfo *msginfo,
break;
case FLT_COND_CMD_TEST:
file = procmsg_get_message_file(msginfo);
+ if (!file)
+ return FALSE;
cmdline = g_strconcat(cond->str_value, " \"", file, "\"", NULL);
matched = (execute_command_line(cmdline, FALSE) == 0);
g_free(cmdline);