commit | d5dabafd06eec7fca6bbbc1605efe2f3f6aa3cce | [log] [tgz] |
---|---|---|
author | Sebastian Rasmussen <sebras@gmail.com> | Wed Jun 29 15:43:05 2022 +0200 |
committer | Sebastian Rasmussen <sebras@gmail.com> | Thu Jun 30 13:58:55 2022 +0200 |
tree | 0d07f74b820f54d4ea655ec96c6aa1f9571e6f21 | |
parent | 39a8d177429744bef1f530dcd738cda7566bb28e [diff] |
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());