]> git.lyx.org Git - features.git/commitdiff
DocBook: add assertion to help debugging.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Thu, 7 Oct 2021 00:34:07 +0000 (02:34 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Wed, 13 Oct 2021 17:26:49 +0000 (19:26 +0200)
src/output_docbook.cpp

index 50b66fbac07825c0ffa07cf67f54b3b8c004bc6c..e234d9d652b0c5e45f58af7ad29449809f79ff0d 100644 (file)
@@ -754,6 +754,8 @@ DocBookDocumentSectioning hasDocumentSectioning(ParagraphList const &paragraphs,
        bool documentHasSections = false;
 
        while (bpit < epit) {
+               LASSERT(bpit < paragraphs.size(), return make_tuple(documentHasSections, bpit));
+
                Layout const &style = paragraphs[bpit].layout();
                documentHasSections |= isLayoutSectioningOrSimilar(style);