From b42c6b3637782c9ad522bcb42e94650d39c51a51 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 29 Apr 2019 14:57:29 +0100 Subject: [PATCH] libmutt: fix history code for degenerate cases --- mutt/history.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mutt/history.c b/mutt/history.c index f41609062..b41ca9807 100644 --- a/mutt/history.c +++ b/mutt/history.c @@ -410,6 +410,9 @@ static void remove_history_dups(enum HistoryClass hclass, const char *str) */ int mutt_hist_search(const char *search_buf, enum HistoryClass hclass, char **matches) { + if (!search_buf || !matches) + return 0; + struct History *h = get_history(hclass); if (!h) return 0; -- 2.49.0