From 18652b6f36cbc78c27ff25bd2265fac10fcf78b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Thu, 28 Nov 2024 15:24:54 +0100 Subject: [PATCH] fix: Fix unload call after destroy (#7690) --- lib/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/player.js b/lib/player.js index ad11b9e76d..ad84c85dab 100644 --- a/lib/player.js +++ b/lib/player.js @@ -1511,7 +1511,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { // after several playbacks, and they are not able anymore to properly // create MediaKeys objects. To prevent it, clear the cache after // each playback. - if (this.config_.streaming.clearDecodingCache) { + if (this.config_ && this.config_.streaming.clearDecodingCache) { shaka.util.StreamUtils.clearDecodingConfigCache(); shaka.util.DrmUtils.clearMediaKeySystemAccessMap(); }