2009-09-14 Simon Fraser <simon.fraser@apple.com>

        Fix the change in r48376 to do a null-check to fix a crashing test.

        * dom/SelectElement.cpp:
        (WebCore::SelectElement::menuListDefaultEventHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e9d93ca8
2009-09-14 Simon Fraser <simon.fraser@apple.com>
Fix the change in r48376 to do a null-check to fix a crashing test.
* dom/SelectElement.cpp:
(WebCore::SelectElement::menuListDefaultEventHandler):
2009-09-14 Simon Fraser <simon.fraser@apple.com>
Reviewed by Dan Bernstein.
......@@ -644,7 +644,7 @@ void SelectElement::menuListDefaultEventHandler(SelectElementData& data, Element
if (event->type() == eventNames().mousedownEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton) {
element->focus();
if (element->renderer()->isMenuList()) {
if (element->renderer() && element->renderer()->isMenuList()) {
if (RenderMenuList* menuList = toRenderMenuList(element->renderer())) {
if (menuList->popupIsVisible())
menuList->hidePopup();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment