[epiphany/mcatanzaro/search-provider: 24/27] search-provider: don't assume there's always a matching suggestion
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/search-provider: 24/27] search-provider: don't assume there's always a matching suggestion
- Date: Sat, 6 Apr 2019 13:06:50 +0000 (UTC)
commit 70cc8e349dad2030f962a33365ac35682dc81fe2
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Fri Apr 5 10:49:46 2019 -0500
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
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 18512fae0..daacbcc0f 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]