This is an automated email from the ASF dual-hosted git repository. centic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/poi.git
commit 8cdcda2873e057cfe48a6abcb43066ed9dbb5195 Author: Dominik Stadler <[email protected]> AuthorDate: Sun Jan 11 20:12:33 2026 +0100 Avoid NPE when handling color-highlighting in text-runs --- .../src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java index b909704d24..a0be4a8a97 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java @@ -191,6 +191,10 @@ public class XSLFTextRun implements TextRun, HighlightColorSupport { } final CTSRgbColor rgbCol = col.getSrgbClr(); + if (rgbCol == null) { + return; + } + final byte[] cols = rgbCol.getVal(); final SolidPaint paint = DrawPaint.createSolidPaint(new Color(0xFF & cols[0], 0xFF & cols[1], 0xFF & cols[2])); highlightColor.accept(paint); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
