Merge pull request #973 from TomHennen/fix972

Guard use of 'media'
This commit is contained in:
Martin Fietz 2015-06-27 17:02:21 +02:00
commit 5d553394ba
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}