From 06001e857c94fcf4cf53b02bb5a11ec4d50d17b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=CC=81lvaro=20Velad=20Galva=CC=81n?= Date: Thu, 28 Nov 2024 15:02:44 +0100 Subject: [PATCH] fix: Fix unload call after destroy --- 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(); }