Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2722623002: Fix a crash when setting MediaControlsEnabled setting for videos without controls (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 7c10b4a0cd078280ff55051abb8acc756b5cb6e8..c4e67443b6595552a9423cf2826c9291ad69d6ab 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -381,7 +381,8 @@ void HTMLMediaElement::onMediaControlsEnabledChange(Document* document) {
WeakMediaElementSet& elements = *it->value;
for (const auto& element : elements) {
element->updateControlsVisibility();
- element->mediaControls()->onMediaControlsEnabledChange();
+ if (element->mediaControls())
+ element->mediaControls()->onMediaControlsEnabledChange();
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/media/controls/settings-disable-controls.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698