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

Unified Diff: Source/core/html/shadow/SliderThumbElement.cpp

Issue 211403003: Add a missing null check in SliderThumbElement::stopDragging() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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 | « LayoutTests/media/audio-delete-while-slider-thumb-clicked.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/SliderThumbElement.cpp
diff --git a/Source/core/html/shadow/SliderThumbElement.cpp b/Source/core/html/shadow/SliderThumbElement.cpp
index e34c2c0d92e96aef021158e3d3e4a9bfbdb46de9..093f36cc057f5f825545647822edcc3d8cd039a1 100644
--- a/Source/core/html/shadow/SliderThumbElement.cpp
+++ b/Source/core/html/shadow/SliderThumbElement.cpp
@@ -226,12 +226,12 @@ bool SliderThumbElement::isDisabledFormControl() const
bool SliderThumbElement::matchesReadOnlyPseudoClass() const
{
- return hostInput()->matchesReadOnlyPseudoClass();
+ return hostInput() && hostInput()->matchesReadOnlyPseudoClass();
}
bool SliderThumbElement::matchesReadWritePseudoClass() const
{
- return hostInput()->matchesReadWritePseudoClass();
+ return hostInput() && hostInput()->matchesReadWritePseudoClass();
}
Node* SliderThumbElement::focusDelegate()
@@ -322,7 +322,8 @@ void SliderThumbElement::stopDragging()
m_inDragMode = false;
if (renderer())
renderer()->setNeedsLayout();
- hostInput()->dispatchFormControlChangeEvent();
+ if (hostInput())
+ hostInput()->dispatchFormControlChangeEvent();
}
void SliderThumbElement::defaultEventHandler(Event* event)
« no previous file with comments | « LayoutTests/media/audio-delete-while-slider-thumb-clicked.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698