aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-completion-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-completion-model.c')
-rw-r--r--src/ephy-completion-model.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 8b8705947..d78e19dfd 100644
--- a/src/ephy-completion-model.c
+++ b/src/ephy-completion-model.c
@@ -261,10 +261,10 @@ should_add_bookmark_to_model (EphyCompletionModel *model,
GRegex *current = NULL;
for (iter = priv->search_terms; iter != NULL; iter = iter->next) {
- current = (GRegex*) iter->data;
- if (((title && !g_regex_match (current, title, G_REGEX_MATCH_NOTEMPTY, NULL))) &&
- ((location && !g_regex_match (current, location, G_REGEX_MATCH_NOTEMPTY, NULL))) &&
- ((keywords && !g_regex_match (current, keywords, G_REGEX_MATCH_NOTEMPTY, NULL)))) {
+ current = (GRegex*)iter->data;
+ if ((!g_regex_match (current, title ? title : "", G_REGEX_MATCH_NOTEMPTY, NULL)) &&
+ (!g_regex_match (current, location ? location : "", G_REGEX_MATCH_NOTEMPTY, NULL)) &&
+ (!g_regex_match (current, keywords ? keywords : "", G_REGEX_MATCH_NOTEMPTY, NULL))) {
ret = FALSE;
break;
}