diff options
Diffstat (limited to 'ui/src/main/java/com/wireguard/android')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt index a2eacd0b..9c9d0ecd 100644 --- a/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt +++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelListFragment.kt @@ -47,6 +47,7 @@ class TunnelListFragment : BaseFragment() { private var binding: TunnelListFragmentBinding? = null private val tunnelFileImportResultLauncher = registerForActivityResult(ActivityResultContracts.GetContent()) { data -> lifecycleScope.launch { + if (data == null) return@launch val contentResolver = activity?.contentResolver ?: return@launch TunnelImporter.importTunnel(contentResolver, data) { showSnackbar(it) } } |