From 07083a14b5435c66d788a68b60f5691b2b1d4b14 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 2 Apr 2019 01:22:14 +0200 Subject: avoid NPE in OpenVpnService --- app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/src') 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); -- cgit v1.2.3