Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

Commit

Permalink
Merge pull request #49 from spark/bugfix/npe-on-cancel-click
Browse files Browse the repository at this point in the history
Prevents NullPointerException when clicking cancel
  • Loading branch information
CityVibes authored Aug 18, 2017
2 parents 7b78f0a + 9b867fb commit 2edcde3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ protected void onCreate(Bundle savedInstanceState) {
Ui.setText(this, R.id.network_name, networkToConnectTo.ssid);
Button cancelButton = Ui.findView(this, R.id.action_cancel);
cancelButton.setOnClickListener(v -> {
connectingProcessWorkerTask.cancel(false);
if (connectingProcessWorkerTask != null) {
connectingProcessWorkerTask.cancel(false);
}
finish();
});

Expand Down

0 comments on commit 2edcde3

Please sign in to comment.