Skip to content

Commit

Permalink
Fixed null pointer issue.
Browse files Browse the repository at this point in the history
Summary:
We need to call unbindService on a Context.  In some cases, mAuthActivity
is null.  Since applicationsContext is passed in to the constructor
and never modified, it should not be null.  So we call unbindService
on applicationsContext instead.

Test Plan: Try SSO with pre-1.8 FB app.

Reviewers: vijaye, jacl, caabernathy

Reviewed By: vijaye

CC: selekman, constantin, lshepard

Differential Revision: https://phabricator.fb.com/D432892

Revert Plan: Safe to revert

Task ID: 982981
  • Loading branch information
Michael Marucheck committed Mar 21, 2012
1 parent 1f0b0ea commit 5a72863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion facebook/src/com/facebook/android/Facebook.java
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ public void onServiceDisconnected(ComponentName arg) {
serviceListener.onError(new Error("Service disconnected"));
// We returned an error so there's no point in
// keeping the binding open.
mAuthActivity.unbindService(TokenRefreshServiceConnection.this);
applicationsContext.unbindService(TokenRefreshServiceConnection.this);
}

private void refreshToken() {
Expand Down

0 comments on commit 5a72863

Please sign in to comment.