Commit 172fda38 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Fix crash in AutomationAXTreeWrapper::IsDesktopTree

Bug: 935963
Test: manual.
Change-Id: I7db0bc37d8085ac3f812818542d1a9dd6f8465de
Reviewed-on: https://chromium-review.googlesource.com/c/1489533
Auto-Submit: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635682}
parent 46688802
...@@ -317,7 +317,8 @@ bool AutomationAXTreeWrapper::OnAccessibilityEvents( ...@@ -317,7 +317,8 @@ bool AutomationAXTreeWrapper::OnAccessibilityEvents(
} }
bool AutomationAXTreeWrapper::IsDesktopTree() const { bool AutomationAXTreeWrapper::IsDesktopTree() const {
return tree_.root()->data().role == ax::mojom::Role::kDesktop; return tree_.root() ? tree_.root()->data().role == ax::mojom::Role::kDesktop
: false;
} }
void AutomationAXTreeWrapper::OnNodeDataWillChange( void AutomationAXTreeWrapper::OnNodeDataWillChange(
......
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