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
This commit is contained in:
parent
e332df4af5
commit
8399da878f
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue