Skip to content

Commit

Permalink
Fix crash on a few Android devices
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 2, 2024
1 parent 7a796e8 commit 4ca491a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/android/src/ch/opengis/qfield/QFieldUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ public static String getPathFromUri(final Context context, final Uri uri) {
}

// Fallback
if (uri == null) {
return path;
}

if (path == null && ("content".equalsIgnoreCase(uri.getScheme()) ||
"file".equalsIgnoreCase(uri.getScheme()))) {
path = uri.getPath();
Expand Down

0 comments on commit 4ca491a

Please sign in to comment.