commit 2ad9d7c05b59fd8d833574be3ee277bdb77994b9
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Tue Mar 4 15:42:51 2025 +0100

    Try to avoid Coverity Scan issue by adding assertion.
---
 src/mathed/InsetMathHull.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index dbf1238ced..804dcb8bb0 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -331,6 +331,9 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool 
output_active,
        if (first == nrows())
                // no equation
                return;
+
+       // Reassure Coverity Scan that we have at least one row.
+       LATTEST(nrows() > 0);
        row_type last = nrows() - 1;
        for (; last != 0; --last)
                if (numbered(last))
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to