TunnelEditorFragment: fix null pointer dereference

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2018-07-19 20:54:33 +02:00
parent 60a6e29350
commit d33e322b67

View File

@ -96,10 +96,12 @@ public class TunnelEditorFragment extends BaseFragment implements AppExclusionLi
@Override @Override
public void onItemRangeInserted(final ObservableList<Peer.Observable> sender, final int positionStart, final int itemCount) { public void onItemRangeInserted(final ObservableList<Peer.Observable> sender, final int positionStart, final int itemCount) {
if (binding != null)
breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers); breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers);
} }
@Override @Override
public void onItemRangeRemoved(final ObservableList<Peer.Observable> sender, final int positionStart, final int itemCount) { public void onItemRangeRemoved(final ObservableList<Peer.Observable> sender, final int positionStart, final int itemCount) {
if (binding != null)
breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers); breakObjectOrientedLayeringHandler.onPropertyChanged(binding.getConfig(), BR.peers);
} }
}; };