summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipFragment.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
index 8d1fa03a..4d28315f 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
@@ -171,8 +171,8 @@ public class EipFragment extends Fragment implements Observer {
super.onResume();
//FIXME: avoid race conditions while checking certificate an logging in at about the same time
//eipCommand(Constants.EIP_ACTION_CHECK_CERT_VALIDITY);
- handleNewState();
bindOpenVpnService();
+ handleNewState();
}
@Override
@@ -407,8 +407,10 @@ public class EipFragment extends Fragment implements Observer {
private boolean isOpenVpnRunningWithoutNetwork() {
boolean isRunning = false;
try {
- isRunning = eipStatus.getLevel() == LEVEL_NONETWORK &&
- mService.isVpnRunning();
+ if (mService != null) {
+ isRunning = eipStatus.getLevel() == LEVEL_NONETWORK &&
+ mService.isVpnRunning();
+ }
} catch (Exception e) {
//eat me
e.printStackTrace();