forked from upstream-mirrors/OpenTracks
fix NPE introduced in #466
This commit is contained in:
@@ -45,7 +45,7 @@ public class ImportActivity extends FragmentActivity implements ImportProgressDi
|
|||||||
if (savedInstanceState == null || !savedInstanceState.getBoolean(BUNDLE_ACTIVITY_RECREATED, false)) {
|
if (savedInstanceState == null || !savedInstanceState.getBoolean(BUNDLE_ACTIVITY_RECREATED, false)) {
|
||||||
if (getIntent().getData() != null) {
|
if (getIntent().getData() != null) {
|
||||||
ImportProgressDialogFragment.showDialog(getSupportFragmentManager(), getIntent().getData(), false);
|
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);
|
ImportProgressDialogFragment.showDialog(getSupportFragmentManager(), getIntent().getClipData().getItemAt(0).getUri(), false);
|
||||||
} else {
|
} else {
|
||||||
// Started from DirectoryChooserActivity
|
// Started from DirectoryChooserActivity
|
||||||
|
|||||||
Reference in New Issue
Block a user