Commit 638a8051 authored by Michael Catanzaro's avatar Michael Catanzaro

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
parent 8b6ce7b8
......@@ -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 *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment