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

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

Issue 2878733003: 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 4352db0109aaa9b011135308023987aed1fe1b2f..32e23a07626a8a129badd4ef09204b85ed8940da 100644
--- a/ui/views/accessibility/ax_window_obj_wrapper.cc
+++ b/ui/views/accessibility/ax_window_obj_wrapper.cc
@@ -87,8 +87,10 @@ void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& new_bounds) {
Widget* widget = Widget::GetWidgetForNativeView(window);
if (widget) {
- widget->GetRootView()->NotifyAccessibilityEvent(
- ui::AX_EVENT_LOCATION_CHANGED, true);
+ views::View* view = widget->GetRootView();
+ if (view) {
+ 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