[gnome-terminal] search provider: Fix incorrect assumption
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] search provider: Fix incorrect assumption
- Date: Sun, 27 Nov 2016 19:09:09 +0000 (UTC)
commit 777e66d2b760704c4867997cc4049e54cb47163a
Author: Christian Persch <chpe gnome org>
Date: Sun Nov 27 20:08:39 2016 +0100
search provider: Fix incorrect assumption
Not every application window is a TerminalWindow.
https://bugzilla.redhat.com/show_bug.cgi?id=1398958`
src/terminal-search-provider.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/terminal-search-provider.c b/src/terminal-search-provider.c
index 2e81dee..90c063e 100644
--- a/src/terminal-search-provider.c
+++ b/src/terminal-search-provider.c
@@ -119,9 +119,12 @@ handle_get_initial_result_set_cb (TerminalSearchProvider2 *skeleton,
windows = gtk_application_get_windows (GTK_APPLICATION (app));
for (l = windows; l != NULL; l = l->next)
{
- TerminalWindow *window = TERMINAL_WINDOW (l->data);
+ TerminalWindow *window = (TerminalWindow*)(l->data);
GList *c, *containers;
+ if (!TERMINAL_IS_WINDOW (l->data))
+ continue;
+
containers = terminal_window_list_screen_containers (window);
for (c = containers; c != NULL; c = c->next)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]