diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 76ca9811..9bd900f4 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1707,8 +1707,10 @@ public class ReactExoplayerView extends FrameLayout implements public void clearSrc() { if (srcUri != null) { - player.stop(); - player.clearMediaItems(); + if (player != null) { + player.stop(); + player.clearMediaItems(); + } this.srcUri = null; this.startPositionMs = -1; this.cropStartMs = -1;