summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2019-04-05 15:49:46 +0000
committerMichael Catanzaro <mcatanzaro@posteo.net>2019-04-06 16:47:57 +0000
commitc7b3c70592ef4ee2a6c9226811ec08e9b876824d (patch)
treea7663ae563bc4c4d08bed86345aca4630942f2db
parentd91624eeff8ed70840b1c81b14f42828b4400099 (diff)
downloadepiphany-c7b3c70592ef4ee2a6c9226811ec08e9b876824d.tar.gz
search-provider: don't assume there's always a matching suggestion
There actually should always be a suggestion, unless gnome-shell is bugged or malicious, but we should be well-behaved and not crash here if there isn't. It's external input, after all. https://bugzilla.redhat.com/show_bug.cgi?id=1696529 (cherry picked from commit 70cc8e349dad2030f962a33365ac35682dc81fe2)
-rw-r--r--src/search-provider/ephy-search-provider.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/search-provider/ephy-search-provider.c b/src/search-provider/ephy-search-provider.c
index e7422e640..4b4ff4f38 100644
--- a/src/search-provider/ephy-search-provider.c
+++ b/src/search-provider/ephy-search-provider.c
@@ -205,6 +205,9 @@ handle_get_result_metas (EphyShellSearchProvider2 *skeleton,
char *decoded_uri;
suggestion = ephy_suggestion_model_get_suggestion_with_uri (self->model, results[i]);
+ if (!suggestion)
+ continue;
+
title = ephy_suggestion_get_unescaped_title (suggestion);
uri = ephy_suggestion_get_uri (suggestion);
decoded_uri = ephy_uri_decode (uri);