diff options
author | Tom Hennen <tom.hennen@gmail.com> | 2015-06-27 10:05:33 -0400 |
---|---|---|
committer | Tom Hennen <tom.hennen@gmail.com> | 2015-06-27 10:05:33 -0400 |
commit | 8399da878faff6f6b649ad4c893f212e3f9beb7b (patch) | |
tree | db659fd035e78187a795d36e2718563bce5d7de3 | |
parent | e332df4af572528f673745da2c7c13bf6ef43def (diff) | |
download | AntennaPod-8399da878faff6f6b649ad4c893f212e3f9beb7b.zip |
Guard use of 'media'
It can be null in this class, so we should make sure it isn't accessed if it is.
fixes AntennaPod/AntennaPod#972
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java index a0d12d3e7..ba5428b81 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java @@ -555,7 +555,7 @@ public abstract class PlaybackController { * Should be used by classes which implement the OnSeekBarChanged interface. */ public void onSeekBarStopTrackingTouch(SeekBar seekBar, float prog) { - if (playbackService != null) { + if (playbackService != null && media != null) { playbackService.seekTo((int) (prog * media.getDuration())); setupPositionObserver(); } |