File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
debugger/src/main/java/org/apache/pdfbox/debugger/pagepane Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,10 @@ private void collectLinkLocations() throws IOException
149149
150150 private void collectLinkLocation (PDAnnotationLink linkAnnotation ) throws IOException
151151 {
152+ if (linkAnnotation .getRectangle () == null )
153+ {
154+ return ;
155+ }
152156 PDAction action = linkAnnotation .getAction ();
153157 if (action instanceof PDActionURI )
154158 {
@@ -209,7 +213,7 @@ private void collectFieldLocations() throws IOException
209213 {
210214 // check if the annotation widget is on this page
211215 // (checking widget.getPage() also works, but it is sometimes null)
212- if (dictionarySet .contains (widget .getCOSObject ()))
216+ if (dictionarySet .contains (widget .getCOSObject ()) && widget . getRectangle () != null )
213217 {
214218 rectMap .put (widget .getRectangle (), "Field name: " + field .getFullyQualifiedName ());
215219 }
You can’t perform that action at this time.
0 commit comments