Commit 686ec17b authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: fixes possible crash in BackdropController

Specifically OnWallpaperPreviewStarted. As this function is called async,
it's entirely possible for there to be no active window.

BUG=940322
TEST=none

Change-Id: I551e7d10a4293ba2e3cb047114661393d873dce5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628034Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662854}
parent fba131dc
......@@ -236,8 +236,11 @@ void BackdropController::OnSplitViewDividerPositionChanged() {
}
void BackdropController::OnWallpaperPreviewStarted() {
wm::GetActiveWindow()->SetProperty(kBackdropWindowMode,
BackdropWindowMode::kDisabled);
aura::Window* active_window = wm::GetActiveWindow();
if (active_window) {
active_window->SetProperty(kBackdropWindowMode,
BackdropWindowMode::kDisabled);
}
UpdateBackdrop();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment