From 1f685b0295ab3267be1d3cdc78a3f1daa5029993 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Tue, 12 Aug 2014 16:25:56 +0200 Subject: [PATCH] Fixed NullPointerException in MediaPlayerActivity --- .../antennapod/activity/MediaplayerActivity.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java index 13e7b8a82..2e5372b60 100644 --- a/src/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -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); + } } }