Don't crash if layout is NULL. (#327934, Christian Kirbach)

2006-01-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_set_virtual_cursor_pos): Don't
	crash if layout is NULL.  (#327934, Christian Kirbach)
This commit is contained in:
Matthias Clasen 2006-01-21 04:03:28 +00:00 committed by Matthias Clasen
parent 967aeb882b
commit 9d0b5fa9dd
3 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_virtual_cursor_pos): Don't
crash if layout is NULL. (#327934, Christian Kirbach)
2006-01-20 Dan Winship <danw@novell.com> 2006-01-20 Dan Winship <danw@novell.com>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init, * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init,

View File

@ -1,3 +1,8 @@
2006-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c (gtk_text_view_set_virtual_cursor_pos): Don't
crash if layout is NULL. (#327934, Christian Kirbach)
2006-01-20 Dan Winship <danw@novell.com> 2006-01-20 Dan Winship <danw@novell.com>
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init, * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init,

View File

@ -6873,6 +6873,9 @@ gtk_text_view_set_virtual_cursor_pos (GtkTextView *text_view,
{ {
GdkRectangle pos; GdkRectangle pos;
if (!text_view->layout)
return;
if (x == -1 || y == -1) if (x == -1 || y == -1)
gtk_text_view_get_cursor_location (text_view, &pos); gtk_text_view_get_cursor_location (text_view, &pos);