From ca5b8690b158f380e3bb37cf421199c05218e0e5 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 27 Nov 2016 20:08:39 +0100 Subject: [PATCH] search provider: Fix incorrect assumption Not every application window is a TerminalWindow. https://bugzilla.redhat.com/show_bug.cgi?id=1398958` (cherry picked from commit 777e66d2b760704c4867997cc4049e54cb47163a) --- src/terminal-search-provider.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/terminal-search-provider.c b/src/terminal-search-provider.c index 2e81dee7ce46..90c063e18b65 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) { -- 2.9.3