Skip to content

Commit

Permalink
Merge pull request nickbutcher#83 from amilcar-andrade/prevent-npe-pl…
Browse files Browse the repository at this point in the history
…ayer-act

Prevent PlayerActivity from crashing
  • Loading branch information
nickbutcher committed May 9, 2016
2 parents 6eb2a65 + 4ea998c commit 8e21f01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/main/java/io/plaidapp/ui/PlayerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,17 @@ protected void onPause() {

@Override
protected void onDestroy() {
dataManager.cancelLoading();
if (dataManager != null) {
dataManager.cancelLoading();
}
super.onDestroy();
}

private void bindPlayer() {
if (player == null) {
return;
}

final Resources res = getResources();
final NumberFormat nf = NumberFormat.getInstance();

Expand Down

0 comments on commit 8e21f01

Please sign in to comment.