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 207d67c12b3432a062675091b5462147e49af360 Author: Dominik Stadler <[email protected]> AuthorDate: Sun Nov 2 22:10:01 2025 +0100 Prevent a NullPointerException The regression-corpus contains some documents which trigger this, but succeed with the added null-check --- .../java/org/apache/poi/hwmf/draw/HwmfGraphics.java | 2 +- test-data/slideshow/npe.ppt | Bin 0 -> 737793 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java index ecfe21f544..14436d1ba5 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfGraphics.java @@ -629,7 +629,7 @@ public class HwmfGraphics implements HwmfCharsetAware { } FontCharset fc = font.getCharset(); - if (fc == FontCharset.DEFAULT) { + if (fc == FontCharset.DEFAULT || fc == null) { return charsetProvider.get(); } diff --git a/test-data/slideshow/npe.ppt b/test-data/slideshow/npe.ppt new file mode 100644 index 0000000000..95703025cc Binary files /dev/null and b/test-data/slideshow/npe.ppt differ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
