Skip to content

Commit

Permalink
fix a crash
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Feb 16, 2018
1 parent fa6aa7e commit ef40e04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/com/irccloud/android/activity/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -891,14 +891,15 @@ else if (message.equals("signup_ip_blocked"))
message = "Error: " + message;
}

if (mGoogleApiClient.isConnected()) {
if (mGoogleApiClient.isConnected() && email.getText().length() > 0 && password.getText().length() > 0) {
Auth.CredentialsApi.delete(mGoogleApiClient, new Credential.Builder(email.getText().toString()).setPassword(password.getText().toString()).build()).setResultCallback(new ResultCallback<com.google.android.gms.common.api.Status>() {
@Override
public void onResult(com.google.android.gms.common.api.Status status) {
}
});
}

} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (JSONException e) {
NetworkConnection.printStackTraceToCrashlytics(e);
}
Expand Down

0 comments on commit ef40e04

Please sign in to comment.