summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java6
1 files changed, 4 insertions, 2 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 3ab39a84..abb8c270 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -371,8 +371,10 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
Log.d("OpenVPN", "Got no last connected profile on null intent. Assuming always on.");
mProfile = ProfileManager.getAlwaysOnVPN(this);
- stopSelf(startId);
- return START_NOT_STICKY;
+ if (mProfile==null) {
+ stopSelf(startId);
+ return START_NOT_STICKY;
+ }
}
/* Do the asynchronous keychain certificate stuff */
mProfile.checkForRestart(this);