From 72a33d03b57e4b1f0641a643875600aca164ed10 Mon Sep 17 00:00:00 2001 From: Emily Dixon Date: Fri, 9 Feb 2024 08:16:34 -0800 Subject: [PATCH] Releases/v0.2.1 ## Improvements * Fix NullPointerException in MuxBaseSDKTheoPlayer.handleAdBreakStarted when release has already been called (#27) Co-authored-by: uyt95 Co-authored-by: GitHub --- .../stats/sdk/muxstats/theoplayer/MuxBaseSDKTheoPlayer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/muxstatssdktheoplayer/src/main/java/com/mux/stats/sdk/muxstats/theoplayer/MuxBaseSDKTheoPlayer.java b/muxstatssdktheoplayer/src/main/java/com/mux/stats/sdk/muxstats/theoplayer/MuxBaseSDKTheoPlayer.java index 1102847..064a19c 100644 --- a/muxstatssdktheoplayer/src/main/java/com/mux/stats/sdk/muxstats/theoplayer/MuxBaseSDKTheoPlayer.java +++ b/muxstatssdktheoplayer/src/main/java/com/mux/stats/sdk/muxstats/theoplayer/MuxBaseSDKTheoPlayer.java @@ -334,7 +334,7 @@ public enum PlayerState { } private void handleAdBreakStarted(String adId, String adCreativeId) { - if (player.get() == null) { + if (player == null || player.get() == null) { return; } @@ -669,6 +669,9 @@ protected void playing() { } protected void seeking() { + if (player == null || player.get() == null) { + return; + } if ((state == PlayerState.INIT && player.get().getPlayer().isAutoplay()) || (isPaused() && numberOfPlayEventsSent < 2 && state == PlayerState.PLAY ) || state == PlayerState.SEEKING