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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2905053002: Fix null ptr exception (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index 0cd2a4c716ba9463955c5f3155aff949cac081db..4dcff4e86f30d9e3fc92baa76824b91574628b4c 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -543,8 +543,9 @@ AccessibilityRole AXNodeObject::NativeAccessibilityRoleIgnoringAria() const {
if (isHTMLOptionElement(*GetNode())) {
HTMLSelectElement* select_element =
toHTMLOptionElement(GetNode())->OwnerSelectElement();
- return select_element->IsMultiple() ? kListBoxOptionRole
- : kMenuListOptionRole;
+ return !select_element || select_element->IsMultiple()
+ ? kListBoxOptionRole
+ : kMenuListOptionRole;
}
if (isHTMLTextAreaElement(*GetNode()))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698