Show unable to open dialog if URI is null.
diff --git a/lib/src/main/java/com/artifex/mupdf/viewer/DocumentActivity.java b/lib/src/main/java/com/artifex/mupdf/viewer/DocumentActivity.java
index d5a2e1a..1062fba 100644
--- a/lib/src/main/java/com/artifex/mupdf/viewer/DocumentActivity.java
+++ b/lib/src/main/java/com/artifex/mupdf/viewer/DocumentActivity.java
@@ -221,6 +221,11 @@
 				Uri uri = intent.getData();
 				String mimetype = getIntent().getType();
 
+				if (uri == null)  {
+					showCannotOpenDialog("No document uri to open");
+					return;
+				}
+
 				mDocKey = uri.toString();
 
 				Log.i(APP, "OPEN URI " + uri.toString());