Merge pull request #2000 from mfietz/issue/1999-opml-import-npe

OpmlImportFromPathActivity: Prevent onActivityResult NPE
This commit is contained in:
Martin Fietz 2016-06-06 19:26:22 +02:00
commit a2d3e83440
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);