Add a LATTEST, just in case this ever causes a problem.

Fixes coverity #23363.
This commit is contained in:
Richard Heck 2016-06-11 23:08:54 -04:00
parent df022f91b4
commit 7aa6f972da

View File

@ -4622,6 +4622,11 @@ static depth_type getDepth(DocIterator const & it)
if (!it[i].inset().inMathed())
depth += it[i].paragraph().getDepth() + 1;
// remove 1 since the outer inset does not count
// we should have at least one non-math inset, so
// depth should nevery be 0. but maybe it is worth
// marking this, just in case.
LATTEST(depth > 0);
// coverity[INTEGER_OVERFLOW]
return depth - 1;
}