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

Unified Diff: ui/views/accessibility/ax_window_obj_wrapper.cc

Issue 2865923004: Check that a view exists before sending an accessibility event. (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: ui/views/accessibility/ax_window_obj_wrapper.cc
diff --git a/ui/views/accessibility/ax_window_obj_wrapper.cc b/ui/views/accessibility/ax_window_obj_wrapper.cc
index 0f08a3c8434892d11c5071a577d14714744b795b..d13669739b00c1bf5f6ef520baada946bd3c73fd 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_window_obj_wrapper.cc
@@ -104,8 +104,10 @@ void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window,
Widget* widget = Widget::GetWidgetForNativeView(window);
if (widget) {
- widget->GetRootView()->NotifyAccessibilityEvent(
- ui::AX_EVENT_LOCATION_CHANGED, true);
+ views::View* view = widget->GetRootView();
varkha 2017/05/09 07:00:57 nit: s/view/root_view
+ if (view) {
varkha 2017/05/09 07:00:57 nit: no {}
+ view->NotifyAccessibilityEvent(ui::AX_EVENT_LOCATION_CHANGED, true);
+ }
}
}
« 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