summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-04-02 01:22:14 +0200
committercyBerta <cyberta@riseup.net>2019-04-02 01:22:14 +0200
commit07083a14b5435c66d788a68b60f5691b2b1d4b14 (patch)
tree416dd30f45b1d985dc48bcd49714d4dc3a4e5d21 /app/src/main
parent197f79fa142c2c6bfe2d5e7279c6fad79fa427c2 (diff)
avoid NPE in OpenVpnService
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index 55e9cfe9..e42e36bb 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -534,6 +534,11 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
//Debug.startMethodTracing(getExternalFilesDir(null).toString() + "/opentun.trace", 40* 1024 * 1024);
+ if (mProfile == null) {
+ VpnStatus.logError("Refusing to open tun device without profile.");
+ return null;
+ }
+
Builder builder = new Builder();
VpnStatus.logInfo(R.string.last_openvpn_tun_config);