Only bring search view to front if it exists.
diff --git a/lib/src/main/java/com/artifex/mupdf/viewer/PageView.java b/lib/src/main/java/com/artifex/mupdf/viewer/PageView.java
index ff2dd2f..c3cf042 100644
--- a/lib/src/main/java/com/artifex/mupdf/viewer/PageView.java
+++ b/lib/src/main/java/com/artifex/mupdf/viewer/PageView.java
@@ -408,7 +408,8 @@
mPatch = new OpaqueImageView(mContext);
mPatch.setScaleType(ImageView.ScaleType.MATRIX);
addView(mPatch);
- mSearchView.bringToFront();
+ if (mSearchView != null)
+ mSearchView.bringToFront();
}
CancellableTaskDefinition<Void, Void> task;