http://dev.mutt.org/trac/ticket/3315 http://dev.mutt.org/trac/changeset/6a08a5244d60 Clear last search pattern if it's invalid. Closes #3315. We keep both, the string version and compiled version around for search-next; however, in case of parsing errors we dropped only the compiled version and not the string one making the code attempting to perform a search using a NULL pattern. Index: pattern.c =================================================================== --- pattern.c (revision 6018:053ef7bbaa72) +++ pattern.c (revision 6019:6a08a5244d60) @@ -1437,6 +1437,7 @@ err.dsize = sizeof (error); if ((SearchPattern = mutt_pattern_comp (temp, M_FULL_MSG, &err)) == NULL) - { + { mutt_error ("%s", error); + LastSearch[0] = '\0'; return (-1); }