fix: WCO crash on bad titlebarStyle (#34140)

fix: WCO crash on bad titlebarStyle
This commit is contained in:
Shelley Vohr 2022-05-17 17:50:27 +02:00 committed by GitHub
parent 4e3587c7c6
commit 97c9451efc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 6 deletions

View file

@ -55,8 +55,8 @@ SkColor WinFrameView::GetReadableFeatureColor(SkColor background_color) {
}
void WinFrameView::InvalidateCaptionButtons() {
// Ensure that the caption buttons container exists
DCHECK(caption_button_container_);
if (!caption_button_container_)
return;
caption_button_container_->InvalidateLayout();
caption_button_container_->SchedulePaint();