From d7045e2b6121f7750565f7b9e906bd74fecb72d9 Mon Sep 17 00:00:00 2001 From: Richard Hitt Date: Sat, 15 Jun 2013 17:21:55 -0700 Subject: [PATCH] Fix Fedora-19 Segmentation fault, bugid 968817. --- src/fe-gtk/xtext.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c index 41fb9fdd..7867342f 100644 --- a/src/fe-gtk/xtext.c +++ b/src/fe-gtk/xtext.c @@ -1780,6 +1780,12 @@ gtk_xtext_scrolldown_timeout (GtkXText * xtext) GtkAdjustment *adj = xtext->adj; textentry *ent; + if (buf->last_ent_end == NULL) /* If context has changed */ + { + xtext->scroll_tag = 0; + return 0; + } + gdk_window_get_pointer (GTK_WIDGET (xtext)->window, 0, &p_y, 0); gdk_drawable_get_size (GTK_WIDGET (xtext)->window, 0, &win_height); @@ -1821,6 +1827,12 @@ gtk_xtext_scrollup_timeout (GtkXText * xtext) GtkAdjustment *adj = xtext->adj; textentry *ent; + if (buf->last_ent_start == NULL) /* If context has changed */ + { + xtext->scroll_tag = 0; + return 0; + } + gdk_window_get_pointer (GTK_WIDGET (xtext)->window, 0, &p_y, 0); if (p_y < 0 && adj->value >= 0)