diff options
author | Xan Lopez <xan@igalia.com> | 2012-03-05 23:14:45 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-03-07 04:49:45 +0800 |
commit | 222b98ba6644addc080cccbd536d9b90bc27d3ba (patch) | |
tree | d68e9f62aa0f1d78dd98210c999821213fedf0d6 /src | |
parent | d97edc0e129191cd7a0b27dc4fabde28047f8d09 (diff) | |
download | gsoc2013-epiphany-222b98ba6644addc080cccbd536d9b90bc27d3ba.tar.gz gsoc2013-epiphany-222b98ba6644addc080cccbd536d9b90bc27d3ba.tar.zst gsoc2013-epiphany-222b98ba6644addc080cccbd536d9b90bc27d3ba.zip |
ephy-completion-model: fix warning when a bookmark has no keywords
Values in EphyNode can be NULL, so guard against that.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-completion-model.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |