mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
PreviewMediaFragment: fix crash when changing theme with audio fragment
Exoplayer is null when recreating Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
6a527a6e87
commit
b8bb261234
1 changed files with 5 additions and 3 deletions
|
@ -703,9 +703,11 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
|
|||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
|
||||
exoPlayer.stop();
|
||||
exoPlayer.release();
|
||||
|
||||
if (exoPlayer != null) {
|
||||
exoPlayer.stop();
|
||||
exoPlayer.release();
|
||||
}
|
||||
|
||||
super.onDetach();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue