diff options
author | Michael BrĂ¼ning <michael.bruning@digia.com> | 2014-03-10 17:45:28 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-10 20:10:51 +0100 |
commit | ae7af3b31222be80f6f66b4c2cbee707b90fe235 (patch) | |
tree | 5f0064c8b4e8ff4ad1bc69fc0dd133c24800bac2 | |
parent | 43736f1be8c933d08607f991c6b36f0f332717a0 (diff) | |
download | qtwebkit-ae7af3b31222be80f6f66b4c2cbee707b90fe235.tar.gz |
Fix crash with rendering sliders that have anonymous nodes.
Added a check to no longer unconditionally call Node::toInputElement.
Task-number: QTBUG-37029
Change-Id: I905dba35c19d4adb6652bbeaad77998560e36119
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
-rw-r--r-- | Source/WebCore/platform/qt/RenderThemeQStyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp index f85a75bd4..14b989894 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp @@ -436,7 +436,7 @@ bool RenderThemeQStyle::paintSliderTrack(RenderObject* o, const PaintInfo& pi, c p.styleOption.state |= QStyleFacade::State_Sunken; // some styles need this to show a highlight on one side of the groove - HTMLInputElement* slider = o->node()->toInputElement(); + HTMLInputElement* slider = o->node() ? o->node()->toInputElement() : 0; if (slider && slider->isSteppable()) { p.styleOption.slider.upsideDown = (p.appearance == SliderHorizontalPart) && !o->style()->isLeftToRightDirection(); // Use the width as a multiplier in case the slider values are <= 1 |