mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Add null pointer check based on Google Play store reports:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getPath()' on a null object reference
This commit is contained in:
parent
36d2fde49b
commit
0debd26a37
@ -86,7 +86,7 @@ public class GpxReceiverActivity extends AbstractGBActivity {
|
|||||||
|
|
||||||
if (documentUris != null) {
|
if (documentUris != null) {
|
||||||
for (Uri uri : documentUris) {
|
for (Uri uri : documentUris) {
|
||||||
if (uri.getPath().toLowerCase().endsWith(".gpx")) {
|
if (uri!=null && uri.getPath().toLowerCase().endsWith(".gpx")) {
|
||||||
FileToProcess file = new FileToProcess(uri);
|
FileToProcess file = new FileToProcess(uri);
|
||||||
fileList.add(file);
|
fileList.add(file);
|
||||||
fileListingText.append(String.format("%s %s\n\n", file.name, file.exists ? getString(R.string.dbmanagementactivity_overwrite) : ""));
|
fileListingText.append(String.format("%s %s\n\n", file.name, file.exists ? getString(R.string.dbmanagementactivity_overwrite) : ""));
|
||||||
|
Loading…
Reference in New Issue
Block a user