Skip to content

Commit

Permalink
Fix error in ProtectionModel_21Jan2015.js when closing key session (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Aug 7, 2023
1 parent dbfe4da commit 3bdcc2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/streaming/protection/models/ProtectionModel_21Jan2015.js
Expand Up @@ -405,6 +405,10 @@ function ProtectionModel_21Jan2015(config) {
function _closeKeySessionInternal(sessionToken) {
const session = sessionToken.session;

if (!session) {
return
}

// Remove event listeners
session.removeEventListener('keystatuseschange', sessionToken);
session.removeEventListener('message', sessionToken);
Expand Down

0 comments on commit 3bdcc2a

Please sign in to comment.