From 39cbfa2c619ce3d41d473b812744b07b1dbd1674 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Mon, 6 Jun 2016 18:48:17 +0200 Subject: [PATCH] Prevent NPE --- .../danoeh/antennapod/activity/OpmlImportFromPathActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java index b2dab7f68..eb6b473d2 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromPathActivity.java @@ -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);