Nullability checks in ExoPlayerWrapper

This commit is contained in:
ByteHamster 2021-03-07 20:00:09 +01:00
parent 7a3bb825ed
commit 0172a5db13
1 changed files with 6 additions and 2 deletions

View File

@ -105,7 +105,9 @@ public class ExoPlayerWrapper implements IPlayer {
@Override @Override
public void onSeekProcessed() { public void onSeekProcessed() {
audioSeekCompleteListener.onSeekComplete(null); if (audioSeekCompleteListener != null) {
audioSeekCompleteListener.onSeekComplete(null);
}
} }
}); });
} }
@ -174,7 +176,9 @@ public class ExoPlayerWrapper implements IPlayer {
@Override @Override
public void seekTo(int i) throws IllegalStateException { public void seekTo(int i) throws IllegalStateException {
exoPlayer.seekTo(i); exoPlayer.seekTo(i);
audioSeekCompleteListener.onSeekComplete(null); if (audioSeekCompleteListener != null) {
audioSeekCompleteListener.onSeekComplete(null);
}
} }
@Override @Override