summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-03-21 15:55:04 +0100
committerStefano Karapetsas <[email protected]>2014-03-21 15:55:04 +0100
commit9e01bddf6bd77e6f2a174f48dfba25a25a8ecf02 (patch)
tree27497a3e96633a0d3cc492524dc0c54ef8226a7a
parent1dce8625e2bfbd5b320b7685acad64a1af2d2d67 (diff)
downloadpluma-9e01bddf6bd77e6f2a174f48dfba25a25a8ecf02.tar.bz2
pluma-9e01bddf6bd77e6f2a174f48dfba25a25a8ecf02.tar.xz
Fix go to line crash after GTK3 support adding
Closes https://github.com/mate-desktop/pluma/issues/75
-rw-r--r--pluma/pluma-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c
index 39f15fcb..0f95a08c 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)