aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-19 20:54:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-19 20:57:00 +0200
commit497ec129040bf5a721dae20ec971a14402c29f52 (patch)
tree994c4536c0023e53fff8d34dc3ffc32c9e932b6b
parentQuickTileService: fix null pointer dereference (diff)
downloadwireguard-android-497ec129040bf5a721dae20ec971a14402c29f52.tar.xz
wireguard-android-497ec129040bf5a721dae20ec971a14402c29f52.zip
TunnelEditorFragment: fix null pointer dereference
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java6
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 e6e3a19..ce7c557 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);
}
};