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:
committed by
Matthias Clasen
parent
a1cb4e7d81
commit
0f762f13c0
@@ -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>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init,
|
||||
|
||||
@@ -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>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init,
|
||||
|
||||
@@ -6870,9 +6870,12 @@ 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);
|
||||
|
||||
|
||||
text_view->virtual_cursor_x = (x == -1) ? pos.x : x;
|
||||
text_view->virtual_cursor_y = (y == -1) ? pos.y + pos.height / 2 : y;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user