aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java b/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java
index d1faaaf3b..8de0deb8a 100644
--- a/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/MediaViewerActivity.java
@@ -348,21 +348,21 @@ public class MediaViewerActivity extends XmppActivity implements AudioManager.On
}
private void pausePlayer() {
- if (isVideo && isPlaying()) {
+ if (player != null && isVideo && isPlaying()) {
player.setPlayWhenReady(false);
player.getPlaybackState();
}
}
private void startPlayer() {
- if (isVideo && !isPlaying()) {
+ if (player != null && isVideo && !isPlaying()) {
player.setPlayWhenReady(true);
player.getPlaybackState();
}
}
private void stopPlayer() {
- if (isVideo) {
+ if (player != null && isVideo) {
if (isPlaying()) {
player.stop(true);
}