From eced7d4c246c007f9617d91edd5867e9e002bfc1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 14 Dec 2013 14:11:14 +0000 Subject: [PATCH] SelectionList should never be empty --- src/selection.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/selection.cc b/src/selection.cc index 4fc7caf7..00972f44 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -103,6 +103,7 @@ void SelectionList::update_erase(const Buffer& buffer, BufferCoord begin, Buffer void SelectionList::check_invariant() const { + kak_assert(size() > 0); kak_assert(m_main < size()); for (size_t i = 0; i+1 < size(); ++ i) kak_assert((*this)[i].min() <= (*this)[i+1].min());