Fixed NullPointerException in MediaPlayerActivity

This commit is contained in:
daniel oeh 2014-08-12 16:25:56 +02:00
parent bdc677bc76
commit 1f685b0295
1 changed files with 10 additions and 4 deletions

View File

@ -502,18 +502,24 @@ public abstract class MediaplayerActivity extends ActionBarActivity
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
prog = controller.onSeekBarProgressChanged(seekBar, progress, fromUser,
txtvPosition);
if (controller != null) {
prog = controller.onSeekBarProgressChanged(seekBar, progress, fromUser,
txtvPosition);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
controller.onSeekBarStartTrackingTouch(seekBar);
if (controller != null) {
controller.onSeekBarStartTrackingTouch(seekBar);
}
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
controller.onSeekBarStopTrackingTouch(seekBar, prog);
if (controller != null) {
controller.onSeekBarStopTrackingTouch(seekBar, prog);
}
}
}