[epiphany/gnome-3-32] search-provider: don't assume there's always a matching suggestion
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] search-provider: don't assume there's always a matching suggestion
- Date: Sat, 6 Apr 2019 16:48:10 +0000 (UTC)
commit c7b3c70592ef4ee2a6c9226811ec08e9b876824d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri Apr 5 15:49:46 2019 +0000
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)
src/search-provider/ephy-search-provider.c | 3 +++
1 file changed, 3 insertions(+)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]