[epiphany] ephy-completion-model: fix warning when a bookmark has no keywords
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-completion-model: fix warning when a bookmark has no keywords
- Date: Tue, 6 Mar 2012 20:53:32 +0000 (UTC)
commit 222b98ba6644addc080cccbd536d9b90bc27d3ba
Author: Xan Lopez <xan igalia com>
Date: Mon Mar 5 16:14:45 2012 +0100
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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-completion-model.c b/src/ephy-completion-model.c
index 6906926..776f2dd 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]