commit 9b4ef18b13b5d68c80b61dd7c706fd0983ae9c2f Author: Nathan Freitas nathan@freitas.net Date: Wed Feb 4 16:28:40 2015 -0500
fix NPE for when mHandler is null --- src/org/torproject/android/vpn/OrbotVpnService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/android/vpn/OrbotVpnService.java b/src/org/torproject/android/vpn/OrbotVpnService.java index c53d288..7919b07 100644 --- a/src/org/torproject/android/vpn/OrbotVpnService.java +++ b/src/org/torproject/android/vpn/OrbotVpnService.java @@ -81,7 +81,8 @@ public class OrbotVpnService extends VpnService implements Handler.Callback { else if (action.equals("stop")) { stopVPN(); - mHandler.postDelayed(new Runnable () { public void run () { stopSelf(); }}, 1000); + if (mHandler != null) + mHandler.postDelayed(new Runnable () { public void run () { stopSelf(); }}, 1000); }
tor-commits@lists.torproject.org