diff --git a/NEWS b/NEWS index 144c51cc..3fcda31f 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,8 @@ Other changes: title, note the charset. Don't truncate titles to the width of the terminal. * bug 1061: Correctly truncate UTF-8 titles in the tab bar. +* Don't crash when the search-toggle-regex action is used and no regular + expression support is compiled in. * minor bug 761: When reading bookmarks from an XBEL file, distinguish attribute names from attribute values. * enhancement: Updated ISO 8859-7, ISO 8859-16, KOI8-R, and MacRoman. diff --git a/src/viewer/text/search.c b/src/viewer/text/search.c index 4b9dc20e..83656dce 100644 --- a/src/viewer/text/search.c +++ b/src/viewer/text/search.c @@ -1423,9 +1423,11 @@ text_typeahead_handler(struct input_line *line, int action_id) get_opt_rec(config_options, "document.browse.search.regex"); - opt->value.number = (opt->value.number + 1) - % (opt->max + 1); - option_changed(ses, opt); + if (opt) { + opt->value.number = (opt->value.number + 1) + % (opt->max + 1); + option_changed(ses, opt); + } } /* Fall thru */