aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-02-02 21:33:31 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-02-02 21:33:31 +0100
commit17ab39fe45fce74fd5ef6cbc668ab88b233bb0e5 (patch)
tree47c6d72c4846e33e7c14c9904cdc886208a8a50c /src/main/java/de
parent64826a6fd9a8f013fe78fb12e6fc366adce7e122 (diff)
don't crash if player == null
Diffstat (limited to 'src/main/java/de')
-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);
}