[EME] NULL-dereference crash in MediaKeys::setMediaElement().
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 17:53:26 +0000 (17:53 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Oct 2014 17:53:26 +0000 (17:53 +0000)
commit5098575ac787ca0ee6c056d1db8698e347cf9ab7
tree3e075938dfb6d47cc5c6800956c2c6e784d5753d
parent2d35386e83ae826ef508b2df8e02d91117e4eb07
[EME] NULL-dereference crash in MediaKeys::setMediaElement().
https://bugs.webkit.org/show_bug.cgi?id=138177

Reviewed by Eric Carlson.

NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
has previously had stop() called.

* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::setMediaElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp