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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2929673002: Add null check when reporting changed nodes to an AX tree. (Closed)
Patch Set: Simplest fix Created 3 years, 6 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 | ui/views/accessibility/ax_window_obj_wrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree.cc
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index 43e635af1a207bede9fe8d71f0e0ef1e3e5da326..ed5c6f744e3e8120ca3b4b4cd0fa9ea23f627362 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -279,6 +279,9 @@ bool AXTree::Unserialize(const AXTreeUpdate& update) {
changes.reserve(update.nodes.size());
for (size_t i = 0; i < update.nodes.size(); ++i) {
AXNode* node = GetFromId(update.nodes[i].id);
+ if (!node)
+ continue;
+
bool is_new_node = new_nodes.find(node) != new_nodes.end();
bool is_reparented_node =
is_new_node && update_state.HasRemovedNode(node);
« no previous file with comments | « no previous file | ui/views/accessibility/ax_window_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698