fix NPE introduced in #466

This commit is contained in:
Peter Storch
2020-10-22 19:08:52 +02:00
parent d4483819eb
commit 88e1a95da7
@@ -45,7 +45,7 @@ public class ImportActivity extends FragmentActivity implements ImportProgressDi
if (savedInstanceState == null || !savedInstanceState.getBoolean(BUNDLE_ACTIVITY_RECREATED, false)) {
if (getIntent().getData() != null) {
ImportProgressDialogFragment.showDialog(getSupportFragmentManager(), getIntent().getData(), false);
} else if (getIntent().getClipData().getItemCount() > 0) {
} else if (getIntent().getClipData() != null && getIntent().getClipData().getItemCount() > 0) {
ImportProgressDialogFragment.showDialog(getSupportFragmentManager(), getIntent().getClipData().getItemAt(0).getUri(), false);
} else {
// Started from DirectoryChooserActivity