Commit 81ce667b authored by Martin Mareš's avatar Martin Mareš

Don't crash when filter_same() gets called on FILTER_ACCEPT or FILTER_REJECT.

parent a92bebe0
......@@ -557,5 +557,10 @@ filters_postconfig(void)
int
filter_same(struct filter *new, struct filter *old)
{
if (old == new) /* Handle FILTER_ACCEPT and FILTER_REJECT */
return 1;
if (old == FILTER_ACCEPT || old == FILTER_REJECT ||
new == FILTER_ACCEPT || new == FILTER_REJECT)
return 0;
return i_same(new->root, old->root);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment