From 42d3fd3b635b04001a2e9f9f956d99cfa741360b Mon Sep 17 00:00:00 2001 From: Maxim Date: Wed, 25 Dec 2024 15:49:40 +0300 Subject: [PATCH] Fix NullPointerException --- .../java/org/verapdf/gf/model/factory/chunks/ChunkParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java b/wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java index d9c23f898..8e756daec 100644 --- a/wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java +++ b/wcag-validation/src/main/java/org/verapdf/gf/model/factory/chunks/ChunkParser.java @@ -184,7 +184,7 @@ public void parseChunk(Operator rawOperator, List arguments) { case Operators.SC_FILL: if (this.graphicsState.isProcessColorOperators()) { PDColorSpace colorSpace = this.graphicsState.getFillColorSpace(); - ASAtom colorSpaceType = colorSpace.getType(); + ASAtom colorSpaceType = colorSpace != null ? colorSpace.getType() : null; if (ASAtom.DEVICERGB.equals(colorSpaceType) || ASAtom.DEVICEGRAY.equals(colorSpaceType) || ASAtom.DEVICECMYK.equals(colorSpaceType) || ASAtom.CALRGB.equals(colorSpaceType) || ASAtom.CALGRAY.equals(colorSpaceType) || ASAtom.INDEXED.equals(colorSpaceType) ||