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

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2758863002: cros: Fix clusterfuzz crash opening stylus palette (Closed)
Patch Set: Created 3 years, 9 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: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index 50fbb48d468a73e876cba08301e08e457cd1a19b..ac5cf4645bd28095a921209b3240fbee54cd886f 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -514,9 +514,11 @@ void HandleShowStylusTools() {
RootWindowController* root_window_controller =
Shell::GetWmRootWindowForNewWindows()->GetRootWindowController();
- PaletteTray* palette_tray =
- root_window_controller->GetShelf()->GetStatusAreaWidget()->palette_tray();
- palette_tray->ShowPalette();
+ StatusAreaWidget* status_area_widget =
+ root_window_controller->GetShelf()->GetStatusAreaWidget();
+ // Tests (clusterfuzz) can trigger this before the status area is ready.
+ if (status_area_widget)
+ status_area_widget->palette_tray()->ShowPalette();
}
bool CanHandleShowStylusTools() {
« 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