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 | d33e322b67043e86c1033c55f67b6339e0d66ed8 (patch) | |
tree | 994c4536c0023e53fff8d34dc3ffc32c9e932b6b /app/src/main | |
parent | 60a6e29350d3e713e2a09931140c3ac1c9013664 (diff) |
TunnelEditorFragment: fix null pointer dereference
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main')
-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); } }; |