summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-04-16 20:22:59 +0200
committerArne Schwabe <arne@rfc2549.org>2013-04-16 20:22:59 +0200
commit8ad913a88fc22325a19eb5b16e385a3c04827fc5 (patch)
tree4ac41ccb8e7aee6972ba3a4a28545f7dc09e902f /src/de/blinkt/openvpn
parent7e3671e2bd04c0695d8b5bbdb1fe33b888253552 (diff)
Fix NPE when calling disconnect() without being connected
Diffstat (limited to 'src/de/blinkt/openvpn')
-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();
}
};