diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-19 20:54:33 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-19 20:57:00 +0200 |
commit | 497ec129040bf5a721dae20ec971a14402c29f52 (patch) | |
tree | 994c4536c0023e53fff8d34dc3ffc32c9e932b6b /app/src | |
parent | 2afb1183245eff5a381c660bc455f6ca868d9f55 (diff) |
TunnelEditorFragment: fix null pointer dereference
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java index e6e3a19e..ce7c5570 100644 --- a/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java +++ b/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java @@ -96,11 +96,13 @@ public class TunnelEditorFragment extends BaseFragment implements AppExclusionLi @Override public void onItemRangeInserted(final ObservableList<Peer.Observable> sender, final int positionStart, final int itemCount) { - breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers); + if (binding != null) + breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers); } @Override public void onItemRangeRemoved(final ObservableList<Peer.Observable> sender, final int positionStart, final int itemCount) { - breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers); + if (binding != null) + breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers); } }; |