From 9e01bddf6bd77e6f2a174f48dfba25a25a8ecf02 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Fri, 21 Mar 2014 15:55:04 +0100 Subject: [PATCH] Fix go to line crash after GTK3 support adding Closes https://github.com/mate-desktop/pluma/issues/75 --- pluma/pluma-view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index 39f15fc..0f95a08 100644 --- a/pluma/pluma-view.c +++ b/pluma/pluma-view.c @@ -1500,10 +1500,12 @@ ensure_search_window (PlumaView *view) toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view)); #if GTK_CHECK_VERSION (3, 0, 0) group = gtk_window_get_group (GTK_WINDOW (toplevel)); - search_group = gtk_window_get_group (GTK_WINDOW (toplevel)); + if (view->priv->search_window != NULL) + search_group = gtk_window_get_group (GTK_WINDOW (view->priv->search_window)); #else group = GTK_WINDOW (toplevel)->group; - search_group = GTK_WINDOW (view->priv->search_window)->group; + if (view->priv->search_window != NULL) + search_group = GTK_WINDOW (view->priv->search_window)->group; #endif if (view->priv->search_window != NULL)