mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Merge pull request #10163 from nextcloud/fix/previewmedia-exoplayer-null
PreviewMediaFragment: prevent crash due to onStop called before exoplayer initialization
This commit is contained in:
commit
d374d87c24
1 changed files with 1 additions and 1 deletions
|
@ -601,7 +601,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
|
|||
final OCFile file = getFile();
|
||||
if (MimeTypeUtil.isAudio(file) && !mediaPlayerServiceConnection.isPlaying()) {
|
||||
stopAudio();
|
||||
} else if (MimeTypeUtil.isVideo(file) && exoPlayer.isPlaying()) {
|
||||
} else if (MimeTypeUtil.isVideo(file) && exoPlayer != null && exoPlayer.isPlaying()) {
|
||||
savedPlaybackPosition = exoPlayer.getCurrentPosition();
|
||||
exoPlayer.pause();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue