aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-07-20 23:20:05 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-07-20 23:20:05 -0700
commit482357db96cb41c0f8d0c9fac1dc0fb3820ee391 (patch)
treef7ca39de1517e9925c51e8fd874dcf1c2b76bbee /app/src/main/java
parenta5d426d8cbe3d8c61ccf9ab32a94daf6e2c0bec5 (diff)
downloadetbsa-traccar-manager-android-482357db96cb41c0f8d0c9fac1dc0fb3820ee391.tar.gz
etbsa-traccar-manager-android-482357db96cb41c0f8d0c9fac1dc0fb3820ee391.tar.bz2
etbsa-traccar-manager-android-482357db96cb41c0f8d0c9fac1dc0fb3820ee391.zip
Fix crashes
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/org/traccar/manager/MainFragment.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/org/traccar/manager/MainFragment.kt b/app/src/main/java/org/traccar/manager/MainFragment.kt
index 8aa0c15..2675d0c 100644
--- a/app/src/main/java/org/traccar/manager/MainFragment.kt
+++ b/app/src/main/java/org/traccar/manager/MainFragment.kt
@@ -102,9 +102,9 @@ class MainFragment : WebViewFragment() {
private var openFileCallback: ValueCallback<Uri?>? = null
private var openFileCallback2: ValueCallback<Array<Uri>>? = null
- override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) {
+ override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == REQUEST_FILE_CHOOSER) {
- val result = if (resultCode != Activity.RESULT_OK) null else data.data
+ val result = if (resultCode != Activity.RESULT_OK) null else data?.data
if (openFileCallback != null) {
openFileCallback?.onReceiveValue(result)
openFileCallback = null