diff --git a/lib/dash/dash_parser.js b/lib/dash/dash_parser.js index c407e16be2..42092f43a0 100644 --- a/lib/dash/dash_parser.js +++ b/lib/dash/dash_parser.js @@ -1500,6 +1500,9 @@ shaka.dash.DashParser = class { let shouldDeleteIndex = true; for (const contextId of this.indexStreamMap_[pId]) { const stream = this.streamMap_[contextId]; + if (!stream) { + continue; + } if (stream.segmentIndex && !stream.segmentIndex.isEmpty()) { shouldDeleteIndex = false; continue;