[epiphany/mcatanzaro/search-provider-crashes: 2/2] suggestion-model: don't crash in search provider mode
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/search-provider-crashes: 2/2] suggestion-model: don't crash in search provider mode
- Date: Wed, 22 May 2019 19:42:34 +0000 (UTC)
commit 66e7e1e03ad61530bfd6f36094ce14a851e419da
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed May 22 14:40:19 2019 -0500
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.
src/ephy-suggestion-model.c | 3 +++
1 file changed, 3 insertions(+)
---
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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]