summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-10-26 19:54:28 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-10-26 19:54:28 -0400
commita91d1adf8cbc3bf9755d1c211f490366ac47782c (patch)
tree33520a876d305996d4bd5e5ba362d84db8db7a8e /src
parentc621a6e8c4beffb2faf70404b843cf93def8cc1b (diff)
Handle out-of-history remove's gracefully
They happen at times of resizing the terminal, etc. Bug 597604 - gnome-terminal assert failure: Vte:ERROR:/build/buildd/vte-0.22.0/./src/ring.c:530:_vte_ring_remove: assertion failed: (_vte_ring_contains (ring, position))
Diffstat (limited to 'src')
-rw-r--r--src/ring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ring.c b/src/ring.c
index 84cd6a9..54a9682 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -533,7 +533,8 @@ _vte_ring_remove (VteRing * ring, gulong position)
_vte_debug_print(VTE_DEBUG_RING, "Removing item at position %lu.\n", position);
_vte_ring_validate(ring);
- g_assert (_vte_ring_contains (ring, position));
+ if (G_UNLIKELY (!_vte_ring_contains (ring, position)))
+ return;
_vte_ring_ensure_writable (ring, position);