diff --git a/src/com/cgogolin/library/Library.java b/src/com/cgogolin/library/Library.java index e3398e6..e253bcb 100644 --- a/src/com/cgogolin/library/Library.java +++ b/src/com/cgogolin/library/Library.java @@ -784,11 +784,12 @@ protected void onPreExecute() protected Void doInBackground(String... libraryPathString) { if (bibtexAdapter == null) { - Uri libraryUri = Uri.parse(libraryPathString[0]); - File libraryFile = new File(Uri.decode(libraryUri.getEncodedPath())); InputStream inputStream = null; try { + Uri libraryUri = Uri.parse(libraryPathString[0]); + File libraryFile = new File(Uri.decode(libraryUri.getEncodedPath())); + if(libraryFile != null && libraryFile.isFile()) { inputStream = new FileInputStream(libraryFile);