aboutsummaryrefslogtreecommitdiffstats
path: root/poi-examples/src
diff options
context:
space:
mode:
Diffstat (limited to 'poi-examples/src')
-rw-r--r--poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
index 14d5fbd9e8..fbe4f58822 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/FromHowTo.java
@@ -136,7 +136,7 @@ public class FromHowTo {
if(nextIsString && StringUtil.isNotBlank(lastContents)) {
Integer idx = Integer.valueOf(lastContents);
lastContents = lruCache.get(idx);
- if (lastContents == null && !lruCache.containsKey(idx)) {
+ if (lastContents == null && !lruCache.containsKey(idx) && sst != null) {
lastContents = sst.getItemAt(idx).getString();
lruCache.put(idx, lastContents);
}