diff --git a/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp b/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp index c0a6ac417de0..e802a4c93279 100644 --- a/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp @@ -445,7 +445,7 @@ void CDMInstanceSessionThunder::keyUpdatedCallback(KeyIDType&& keyID) auto keyStatus = status(keyID); GST_DEBUG("updated with with key status %s", toString(keyStatus)); - m_doesKeyStoreNeedMerging |= m_keyStore.add(KeyHandle::create(keyStatus, WTFMove(keyID), BoxPtr(m_session))); + auto instance = cdmInstanceThunder(); if (instance && GStreamerEMEUtilities::isPlayReadyKeySystem(instance->keySystem())) { // PlayReady corner case hack: It happens that the key ID @@ -460,6 +460,8 @@ void CDMInstanceSessionThunder::keyUpdatedCallback(KeyIDType&& keyID) GST_MEMDUMP("updated swapped key", swappedKeyID.data(), swappedKeyID.size()); m_doesKeyStoreNeedMerging |= m_keyStore.add(KeyHandle::create(keyStatus, WTFMove(swappedKeyID), BoxPtr(m_session))); } + + m_doesKeyStoreNeedMerging |= m_keyStore.add(KeyHandle::create(keyStatus, WTFMove(keyID), BoxPtr(m_session))); } void CDMInstanceSessionThunder::keysUpdateDoneCallback()