summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/ignore.c6
-rw-r--r--src/fe-text/textbuffer.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ignore.c b/src/core/ignore.c
index 30cb7cb8..c91f6e4a 100644
--- a/src/core/ignore.c
+++ b/src/core/ignore.c
@@ -66,8 +66,10 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text)
if (text == NULL)
return FALSE;
- if (rec->regexp)
- return rec->preg && g_regex_match(rec->preg, text, 0, NULL);
+ if (rec->regexp) {
+ return rec->preg != NULL &&
+ g_regex_match(rec->preg, text, 0, NULL);
+ }
return rec->fullword ?
stristr_full(text, rec->pattern) != NULL :
diff --git a/src/fe-text/textbuffer.c b/src/fe-text/textbuffer.c
index 7d0806d1..f35848a2 100644
--- a/src/fe-text/textbuffer.c
+++ b/src/fe-text/textbuffer.c
@@ -570,7 +570,7 @@ GList *textbuffer_find_text(TEXT_BUFFER_REC *buffer, LINE_REC *startline,
textbuffer_line2text(line, FALSE, str);
if (line_matched) {
- line_matched = regexp ?
+ line_matched = regexp ?
g_regex_match(preg, str->str, 0, NULL) :
match_func(str->str, text) != NULL;
}