From c621a6e8c4beffb2faf70404b843cf93def8cc1b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 26 Oct 2009 19:54:08 -0400 Subject: [ring] Remove one assertion Better dealing with corrupt history file, etc. --- src/ring.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ring.c b/src/ring.c index 3c0a0bb..84cd6a9 100644 --- a/src/ring.c +++ b/src/ring.c @@ -236,9 +236,13 @@ _vte_ring_thaw_row (VteRing *ring, gulong position, VteRowData *row, gboolean tr p = q; if (G_UNLIKELY (cell.attr.columns == 0)) { - /* Combine it */ - g_assert (row->len); - row->cells[row->len - 1].c = _vte_unistr_append_unichar (row->cells[row->len - 1].c, cell.c); + if (G_LIKELY (row->len)) { + /* Combine it */ + row->cells[row->len - 1].c = _vte_unistr_append_unichar (row->cells[row->len - 1].c, cell.c); + } else { + cell.attr.columns = 1; + _vte_row_data_append (row, &cell); + } } else { _vte_row_data_append (row, &cell); if (cell.attr.columns > 1) { -- cgit v1.2.3