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

Unified Diff: ui/app_list/apps_grid_view.cc

Issue 10963040: app_list: Fix app_list_unittests crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/app_list/test/app_list_test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/apps_grid_view.cc
diff --git a/ui/app_list/apps_grid_view.cc b/ui/app_list/apps_grid_view.cc
index 338a6ccbcb431fc7015c9ffb9618d0f96c10afb7..ef1476487b518b9ddff488bbae0266f6e8e70e06 100644
--- a/ui/app_list/apps_grid_view.cc
+++ b/ui/app_list/apps_grid_view.cc
@@ -293,8 +293,10 @@ void AppsGridView::SetSelectedItemByIndex(int index) {
selected_item_index_ = index;
AppListItemView* selected_view = GetItemViewAtIndex(selected_item_index_);
selected_view->SchedulePaint();
- GetWidget()->NotifyAccessibilityEvent(
- selected_view, ui::AccessibilityTypes::EVENT_FOCUS, true);
+ if (GetWidget()) {
+ GetWidget()->NotifyAccessibilityEvent(
+ selected_view, ui::AccessibilityTypes::EVENT_FOCUS, true);
+ }
if (tiles_per_page()) {
pagination_model_->SelectPage(selected_item_index_ / tiles_per_page(),
« no previous file with comments | « no previous file | ui/app_list/test/app_list_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698