mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 04:30:11 +00:00
text layout: Add an assertion
It is bad news if we end up in snapshot() with lines that are (partially) invalid. For example, we may end up with the line that contains the cursors having its cursors array purged, causing us to not draw the blinking cursor despite us changing cursor alpha in a tick callback. Add an assertion to catch this when it happens.
This commit is contained in:
parent
6edcaf1a43
commit
2301e73f23
@ -4112,6 +4112,7 @@ gtk_text_layout_snapshot (GtkTextLayout *layout,
|
||||
if (line_display->height > 0)
|
||||
{
|
||||
g_assert (line_display->layout != NULL);
|
||||
g_assert (!line_display->cursors_invalid);
|
||||
|
||||
if (have_selection)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user