Skip to content

Fixing possible NPE in PubkeyListActivity #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2015

Conversation

sblackshear
Copy link
Contributor

The PubkeyListActivity lifecycle and the ServiceConnection lifecycle are independent. In the case that the onCreateContextMenu callback fires before the onServiceConnected callback, the bound field will be null in onCreateContextMenu (as well as in some of its callees and in the callbacks that it registers) and can throw an exception when dereferenced. This pull request fixes the issue by including a check that bound is non-null when computing the loaded boolean that guards the potentially failing dereferences of bound.

kruton added a commit that referenced this pull request Mar 29, 2015
Fixing possible NPE in PubkeyListActivity
@kruton kruton merged commit 9b86796 into connectbot:master Mar 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants