[epiphany] search-engine-manager: Always return a search engine address
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] search-engine-manager: Always return a search engine address
- Date: Wed, 12 Jul 2017 23:43:49 +0000 (UTC)
commit 9ee69f99b48e4d384b446162b1861f8351696995
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Jul 12 18:40:19 2017 -0500
search-engine-manager: Always return a search engine address
We need to return a default search engine address if the value in
GSettings is somehow messed up. This fixes a crash if the
default-search-engine and search-engines settings somehow become
desynced.
https://bugzilla.redhat.com/show_bug.cgi?id=1470287
lib/ephy-search-engine-manager.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/ephy-search-engine-manager.c b/lib/ephy-search-engine-manager.c
index f65110a..a37c76d 100644
--- a/lib/ephy-search-engine-manager.c
+++ b/lib/ephy-search-engine-manager.c
@@ -27,6 +27,8 @@
#include "ephy-settings.h"
#include "ephy-prefs.h"
+#define FALLBACK_ADDRESS "https://duckduckgo.com/?q=%s&t=epiphany"
+
enum {
SEARCH_ENGINES_CHANGED,
LAST_SIGNAL
@@ -145,7 +147,7 @@ ephy_search_engine_manager_get_address (EphySearchEngineManager *manager,
if (info)
return info->address;
- return NULL;
+ return FALLBACK_ADDRESS;
}
const char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]