Prevent NPE

This commit is contained in:
Martin Fietz 2016-06-06 18:48:17 +02:00
parent ed077f6bae
commit 39cbfa2c61
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == CHOOSE_OPML_FILE) {
Uri uri = data.getData();
if(uri.toString().startsWith("/")) {
if(uri != null && uri.toString().startsWith("/")) {
uri = Uri.parse("file://" + uri.toString());
}
importUri(uri);