[vte] widget: a11y: Remove assert
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: a11y: Remove assert
- Date: Tue, 16 Mar 2021 16:56:23 +0000 (UTC)
commit b333d66879963637099dc0bc5a702f50f34da67e
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 16 17:55:47 2021 +0100
widget: a11y: Remove assert
This assert is getting hit more frequently now, e.g. by #340.
Replace it with an if branch.
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/340
src/vteaccess.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/vteaccess.cc b/src/vteaccess.cc
index c67afc40..8cf6feee 100644
--- a/src/vteaccess.cc
+++ b/src/vteaccess.cc
@@ -627,7 +627,8 @@ _vte_terminal_accessible_text_scrolled(VteTerminalAccessible* accessible,
if (len > i) {
/* snapshot_text always contains a trailing '\n',
* insertion happens in front of it: bug 657960 */
- g_assert(i >= 1);
+ // g_assert(i >= 1);
+ if (i > 0)
emit_text_changed_insert(G_OBJECT(accessible),
priv->snapshot_text->str,
i - 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]