diff --git a/lib/media/stream.js b/lib/media/stream.js index 42ad8e346d..dba5856ca2 100644 --- a/lib/media/stream.js +++ b/lib/media/stream.js @@ -264,6 +264,11 @@ shaka.media.Stream.prototype.switch = function( Promise.all(async).then(shaka.util.TypedBind(this, /** @param {!Array} results */ function(results) { + if (!this.video_) { + // We got destroyed. + return; + } + var previousStreamInfo = this.streamInfo_; this.streamInfo_ = streamInfo;