diff --git a/ChangeLog b/ChangeLog index 16f5ba6dda..930562a8ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-20 Matthias Clasen + + * 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 * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 16f5ba6dda..930562a8ce 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-01-20 Matthias Clasen + + * 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 * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init, diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index e36b5b15cd..922247aa33 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -6873,6 +6873,9 @@ gtk_text_view_set_virtual_cursor_pos (GtkTextView *text_view, { GdkRectangle pos; + if (!text_view->layout) + return; + if (x == -1 || y == -1) gtk_text_view_get_cursor_location (text_view, &pos);