From 222b98ba6644addc080cccbd536d9b90bc27d3ba Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 5 Mar 2012 16:14:45 +0100 Subject: ephy-completion-model: fix warning when a bookmark has no keywords Values in EphyNode can be NULL, so guard against that. --- src/ephy-completion-model.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c index 69069261c..776f2ddbd 100644 --- a/src/ephy-completion-model.c +++ b/src/ephy-completion-model.c @@ -216,9 +216,9 @@ should_add_bookmark_to_model (EphyCompletionModel *model, for (iter = priv->search_terms; iter != NULL; iter = iter->next) { current = (GRegex*) iter->data; - if ((!g_regex_match (current, title, G_REGEX_MATCH_NOTEMPTY, NULL)) && - (!g_regex_match (current, location, G_REGEX_MATCH_NOTEMPTY, NULL)) && - (!g_regex_match (current, keywords, G_REGEX_MATCH_NOTEMPTY, NULL))) { + 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)))) { ret = FALSE; break; } -- cgit v1.2.3