From c5762fa475bfd8ffc3fd66ebb0d246675b1d98d0 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 16 Feb 2016 11:50:06 +0100 Subject: [PATCH] Don't NPE --- .../danoeh/antennapod/activity/MediaplayerActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index d22fad320..e890f03b7 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -792,7 +792,9 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O builder.setNegativeButton(R.string.cancel_label, null); builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { UserPreferences.setPrefRewindSecs(choice); - txtvRev.setText(String.valueOf(choice)); + if(txtvRev != null){ + txtvRev.setText(String.valueOf(choice)); + } }); builder.create().show(); return true; @@ -833,7 +835,9 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O builder.setNegativeButton(R.string.cancel_label, null); builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { UserPreferences.setPrefFastForwardSecs(choice); - txtvFF.setText(String.valueOf(choice)); + if(txtvFF != null) { + txtvFF.setText(String.valueOf(choice)); + } }); builder.create().show(); return true;