From 061509bf756193d1bc0a754e0cf8dab62869ea9d Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 28 May 2014 20:50:45 +0200 Subject: [PATCH] Avoid an assertion. Do not assert if an inset separator is the only item of a List environment. Although it is a weird thing to do, both GUI and latex output can deal with it. --- src/TextMetrics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index e8053cb36f..1b434a503c 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -695,13 +695,13 @@ int TextMetrics::labelFill(pit_type const pit, Row const & row) const Paragraph const & par = text_->getPar(pit); pos_type last = par.beginOfBody(); - LBUFERR(last > 0); + LBUFERR(last > 0 || par.isEnvSeparator(0)); // -1 because a label ends with a space that is in the label --last; // a separator at this end does not count - if (par.isLineSeparator(last)) + if (last >= 0 && par.isLineSeparator(last)) --last; int w = 0; -- 2.39.2