summary refs log tree commit diff stats
path: root/src/fe-gtk
diff options
context:
space:
mode:
authorRichard Hitt <rbh00@localhost.localdomain>2013-06-15 17:21:55 -0700
committerRichard Hitt <rbh00@localhost.localdomain>2013-06-15 17:21:55 -0700
commitd7045e2b6121f7750565f7b9e906bd74fecb72d9 (patch)
tree4db6c24ddb0b3f12811fde3a5cc1ef5762f5c7d7 /src/fe-gtk
parent8ce1a9476d07c38317b6f2d3fd5245174f76211a (diff)
Fix Fedora-19 Segmentation fault, bugid 968817.
Diffstat (limited to 'src/fe-gtk')
-rw-r--r--src/fe-gtk/xtext.c12
1 files changed, 12 insertions, 0 deletions
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)