This is an automated email from the ASF dual-hosted git repository. fanningpj pushed a commit to branch pjfanning-patch-1 in repository https://gitbox.apache.org/repos/asf/poi.git
commit 9fd27d2744904c8bbdcf0a82fac79cc1ae23fd16 Author: PJ Fanning <[email protected]> AuthorDate: Mon Dec 8 15:34:07 2025 +0100 [bz-69897] Fix null check for LineDash properties --- .../src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java index 4d3c78b933..6a1c6bb4ce 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java @@ -535,7 +535,7 @@ public abstract class XSLFSimpleShape extends XSLFShape @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); - if (ln == null || !ln.isSetPrstDash()) { + if (ln == null || !ln.isSetPrstDash() || ln.getPrstDash().getVal() == null) { return false; } @@ -548,7 +548,7 @@ public abstract class XSLFSimpleShape extends XSLFShape LineDash dash = fetcher.getValue(); if (dash == null) { CTLineProperties defaultLn = getDefaultLineProperties(); - if (defaultLn != null && defaultLn.isSetPrstDash()) { + if (defaultLn != null && defaultLn.isSetPrstDash() && defaultLn.getPrstDash().getVal() != null) { dash = LineDash.fromOoxmlId(defaultLn.getPrstDash().getVal().intValue()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
