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(); }