summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-12-03 18:05:19 +0100
committerParménides GV <parmegv@sdf.org>2013-12-03 18:05:19 +0100
commit28e03b04910a6a8ac251bcb1df79959338c1b686 (patch)
tree486fb8f6809ad899eab37994ad36ab1e7942f62f
parentcd0433f7448307ac9067d4f112bc074f643b4698 (diff)
NullPointer checks in logout
Check if eipStatus and mProgressBar are null in logout(), and if so fetch the objects with findViewById.
-rw-r--r--src/se/leap/bitmaskclient/Dashboard.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/se/leap/bitmaskclient/Dashboard.java b/src/se/leap/bitmaskclient/Dashboard.java
index 103310bb..8a1a62a6 100644
--- a/src/se/leap/bitmaskclient/Dashboard.java
+++ b/src/se/leap/bitmaskclient/Dashboard.java
@@ -301,7 +301,9 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
//if(mProgressDialog != null) mProgressDialog.dismiss();
//mProgressDialog = ProgressDialog.show(this, getResources().getString(R.string.logout_title), getResources().getString(R.string.logout_message), true);
+ if(mProgressBar == null) mProgressBar = (ProgressBar) findViewById(R.id.eipProgress);
mProgressBar.setVisibility(ProgressBar.VISIBLE);
+ if(eipStatus == null) eipStatus = (TextView) findViewById(R.id.eipStatus);
eipStatus.setText("Starting to logout");
//mProgressBar.setMax(1);
startService(provider_API_command);