From: Matthias Clasen Date: Mon, 23 May 2022 12:28:00 +0000 (-0400) Subject: Remove an assertion that we hit X-Git-Tag: archive/raspbian/4.7.2+ds-3+rpi1^2^2~15^2~1^2~6^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=09a01512335e13014c9440c1aa5b11aaf42b1d30;p=gtk4.git Remove an assertion that we hit It appears that we mess up accounting for blinking cursors sometimes, and can hit blink_cb when there is a nonempty selection. Instead of asserting, warn and stop blinking. Related: #4767 --- diff --git a/gtk/gtktext.c b/gtk/gtktext.c index e8e1c51563..b8e15aa2d2 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -6571,7 +6571,13 @@ blink_cb (GtkWidget *widget, return G_SOURCE_REMOVE; } - g_assert (priv->selection_bound == priv->current_pos); + if (priv->selection_bound != priv->current_pos) + { + g_warning ("GtkText - unexpected blinking selection. Removing"); + + gtk_text_check_cursor_blink (self); + return G_SOURCE_REMOVE; + } blink_timeout = get_cursor_blink_timeout (self); blink_time = get_cursor_time (self);