diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-10-26 19:54:08 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-10-26 19:54:08 -0400 |
commit | c621a6e8c4beffb2faf70404b843cf93def8cc1b (patch) | |
tree | 3a30a4ddbfb0b5daf761c9d75da58c3b3e010aa1 | |
parent | 572f86ce2faf7532c30751e5c5f9893468550eba (diff) |
[ring] Remove one assertion
Better dealing with corrupt history file, etc.
-rw-r--r-- | src/ring.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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) { |