diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-01-27 23:11:36 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-01-27 23:11:36 +0100 |
commit | 29c0c3eeb07d77c6a0b00cb42c82897148d4732d (patch) | |
tree | 32124a2d6945e98fc4ac2af32fd294e036013998 /main | |
parent | 8a54bf7ff277a765e60f00dbf1505d4e56bd0853 (diff) |
Log an exception when Android return null on establishtun
Diffstat (limited to 'main')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 41306db8..81dea416 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -612,7 +612,10 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac try { //Debug.stopMethodTracing(); - return builder.establish(); + ParcelFileDescriptor tun = builder.establish(); + if (tun==null) + throw new NullPointerException("Android establish() method returned null (Really broken network configuration?)"); + return tun; } catch (Exception e) { VpnStatus.logError(R.string.tun_open_error); VpnStatus.logError(getString(R.string.error) + e.getLocalizedMessage()); |