Skip to content

Commit

Permalink
Fix crash in AutomationAXTreeWrapper::IsDesktopTree
Browse files Browse the repository at this point in the history
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: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635682}
  • Loading branch information
dtsengchromium authored and Commit Bot committed Feb 26, 2019
1 parent 4668880 commit 172fda3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chrome/renderer/extensions/automation_ax_tree_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ bool AutomationAXTreeWrapper::OnAccessibilityEvents(
}

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(
Expand Down

0 comments on commit 172fda3

Please sign in to comment.