Merge pull request #2000 from mfietz/issue/1999-opml-import-npe
OpmlImportFromPathActivity: Prevent onActivityResult NPE
This commit is contained in:
commit
a2d3e83440
|
@ -135,7 +135,7 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (resultCode == RESULT_OK && requestCode == CHOOSE_OPML_FILE) {
|
if (resultCode == RESULT_OK && requestCode == CHOOSE_OPML_FILE) {
|
||||||
Uri uri = data.getData();
|
Uri uri = data.getData();
|
||||||
if(uri.toString().startsWith("/")) {
|
if(uri != null && uri.toString().startsWith("/")) {
|
||||||
uri = Uri.parse("file://" + uri.toString());
|
uri = Uri.parse("file://" + uri.toString());
|
||||||
}
|
}
|
||||||
importUri(uri);
|
importUri(uri);
|
||||||
|
|
Loading…
Reference in New Issue