Added fail-safe

This commit is contained in:
M66B 2022-09-18 13:30:11 +02:00
parent 1163c68e24
commit 50ddc885d3
1 changed files with 2 additions and 2 deletions

View File

@ -643,11 +643,11 @@ public class StyleHelper {
for (BulletSpan span : spans)
if (span instanceof BulletSpanEx) {
BulletSpanEx bs = (BulletSpanEx) span;
bs.setLevel(bs.getLevel() + add);
bs.setLevel(Math.max(0, bs.getLevel() + add));
} else if (span instanceof NumberSpan) {
renum = true;
NumberSpan ns = (NumberSpan) span;
ns.setLevel(ns.getLevel() + add);
ns.setLevel(Math.max(0, ns.getLevel() + add));
}
if (renum)