summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-13 04:13:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-13 04:13:35 +0200
commit7364f2540e34442a65ccd8c6d39b60ede3c63cf8 (patch)
tree0af9a175390d055366cbfab54e1063e92491156d
parent5d66f6b2e5be70ae7750018282eef98c10219dcd (diff)
BaseFragment: do not allow tunnel to be null
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/BaseFragment.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java b/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java
index f4c6ea81..a5e28c81 100644
--- a/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java
@@ -91,6 +91,8 @@ public abstract class BaseFragment extends Fragment implements OnSelectedTunnelC
tunnel = ((TunnelListItemBinding) binding).getItem();
else
return;
+ if (tunnel == null)
+ return;
Application.onHaveBackend(backend -> {
if (backend instanceof GoBackend) {