diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-05-22 14:40:19 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-05-22 14:43:30 -0500 |
commit | 0993266ff26bd775b4aa823b300eaca1b85fcdbd (patch) | |
tree | 1e4b86e574ba43abaeccbee6d9233ce3ead9f59b /src | |
parent | abfdf22a8d486f6cb6a60e063c221558a3591d1d (diff) | |
download | epiphany-0993266ff26bd775b4aa823b300eaca1b85fcdbd.tar.gz |
suggestion-model: don't crash in search provider mode
e962f8ec broke the search provider; it now crashes instead of returning
results. Problem is there's no window in search provider mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/ephy-suggestion-model.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ephy-suggestion-model.c b/src/ephy-suggestion-model.c index 3a59b505d..5221c06b6 100644 --- a/src/ephy-suggestion-model.c +++ b/src/ephy-suggestion-model.c @@ -368,6 +368,9 @@ add_tabs (EphySuggestionModel *self, application = G_APPLICATION (shell); window = EPHY_WINDOW (gtk_application_get_active_window (GTK_APPLICATION (application))); + if (!window) + return 0; + notebook = ephy_window_get_notebook (window); n_pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)); current = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)); |