summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-06-16 22:31:50 +0200
committerParménides GV <parmegv@sdf.org>2014-06-16 22:31:50 +0200
commitee49de021bab8838ed44897f1046cb7d0f8f5921 (patch)
tree7f0f246ce67215b475ac2d8d1f5ee20310a7170f /app/src/main/java/se
parente2793ff1ad97a373993fd8628a514c772d6d5434 (diff)
Check if there is an active gateway selected.
The active gateway cannot be null.
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EIP.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java
index 59faf93f..a7a17e5f 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java
@@ -234,8 +234,9 @@ public final class EIP extends IntentService {
* Intent to {@link se.leap.openvpn.LaunchVPN}
*/
private void startEIP() {
- activeGateway = selectGateway();
+ activeGateway = selectGateway();
+ if(activeGateway != null && activeGateway.mVpnProfile != null) {
Intent intent = new Intent(this,LaunchVPN.class);
intent.setAction(Intent.ACTION_MAIN);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
@@ -245,6 +246,7 @@ public final class EIP extends IntentService {
intent.putExtra(RECEIVER_TAG, mReceiver);
startActivity(intent);
mPending = ACTION_START_EIP;
+ }
}
/**