Skip to content

Commit 847fe6e

Browse files
committed
Merge branch 'YuriyBereguliak-master'
2 parents e39aca3 + 1a57448 commit 847fe6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/DragPinchManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ public boolean onSingleTapConfirmed(MotionEvent e) {
8787

8888
private boolean checkLinkTapped(float x, float y) {
8989
PdfFile pdfFile = pdfView.pdfFile;
90+
if (pdfFile == null) {
91+
return false;
92+
}
9093
float mappedX = -pdfView.getCurrentXOffset() + x;
9194
float mappedY = -pdfView.getCurrentYOffset() + y;
9295
int page = pdfFile.getPageAtOffset(pdfView.isSwipeVertical() ? mappedY : mappedX, pdfView.getZoom());

0 commit comments

Comments
 (0)