aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-01-11 13:22:12 -0800
committerScott Jackson <daneren2005@gmail.com>2014-01-11 13:22:12 -0800
commitc60a3f80a06d4ec023562dc2b1cd0e988c722e5a (patch)
tree7a6d91fbb96b955eb92cf3344e54772c05ba5707
parent968868b8260dbd914d1b3475704afb69cd7f27cf (diff)
downloaddsub-c60a3f80a06d4ec023562dc2b1cd0e988c722e5a.tar.gz
dsub-c60a3f80a06d4ec023562dc2b1cd0e988c722e5a.tar.bz2
dsub-c60a3f80a06d4ec023562dc2b1cd0e988c722e5a.zip
Fix a weird crash in logs
-rw-r--r--src/github/daneren2005/dsub/fragments/DownloadFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java
index 9b634aac..de721f7d 100644
--- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java
+++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java
@@ -1110,8 +1110,10 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
switch (playerState) {
case DOWNLOADING:
- long bytes = currentPlaying.getPartialFile().length();
- statusTextView.setText(context.getResources().getString(R.string.download_playerstate_downloading, Util.formatLocalizedBytes(bytes, context)));
+ if(currentPlaying != null) {
+ long bytes = currentPlaying.getPartialFile().length();
+ statusTextView.setText(context.getResources().getString(R.string.download_playerstate_downloading, Util.formatLocalizedBytes(bytes, context)));
+ }
break;
case PREPARING:
statusTextView.setText(R.string.download_playerstate_buffering);