summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/de/blinkt/openvpn/api/ExternalOpenVPNService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java b/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java
index 2eee8d82..21580eb4 100644
--- a/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java
+++ b/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java
@@ -210,8 +210,8 @@ public class ExternalOpenVPNService extends Service implements StateListener {
@Override
public void disconnect() throws RemoteException {
checkOpenVPNPermission();
-
- mService.getManagement().stopVPN();
+ if(mService!=null && mService.getManagement()!=null)
+ mService.getManagement().stopVPN();
}
};