BaseFragment: do not allow tunnel to be null

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-07-13 04:13:35 +02:00
parent 5d66f6b2e5
commit 7364f2540e

View File

@ -91,6 +91,8 @@ public abstract class BaseFragment extends Fragment implements OnSelectedTunnelC
tunnel = ((TunnelListItemBinding) binding).getItem(); tunnel = ((TunnelListItemBinding) binding).getItem();
else else
return; return;
if (tunnel == null)
return;
Application.onHaveBackend(backend -> { Application.onHaveBackend(backend -> {
if (backend instanceof GoBackend) { if (backend instanceof GoBackend) {