Fix a cornercase crash

If gtk_text_layout_move_cursor_visually is called with a
count of 0, we were passing NULL to a free function that
can't handle it. Don't do that.

https://bugzilla.gnome.org/show_bug.cgi?id=750058
This commit is contained in:
Matthias Clasen 2015-05-28 23:42:14 -04:00
parent 03312371da
commit 02e2f7dc56

View File

@ -3660,7 +3660,8 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
gtk_text_iter_backward_char (iter);
}
gtk_text_layout_free_line_display (layout, display);
if (display)
gtk_text_layout_free_line_display (layout, display);
done: