Commit 86891cd2 authored by Balazs Engedy's avatar Balazs Engedy Committed by Commit Bot

Check for null WebContents in ContentSettingImageView::AnimationEnded.

While location bar user input in progress, GetContentSettingWebContents
will return nullptr, but ContentSettingImageView::AnimationEnded is
still invoked.

Add a check in the latter to make sure we are not checking on a null
WebContent if the promo should be shown.

Bug: 1054074
Change-Id: I261bceb410478360f6af2d84ddf5e01f5c9e6cc3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064968Reviewed-by: default avatarDana Fried <dfried@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743025}
parent ce840f03
......@@ -234,7 +234,8 @@ void ContentSettingImageView::AnimationEnded(const gfx::Animation* animation) {
// The promo currently is only used for Notifications, and it is only shown
// directly after the animation is shown.
if (content_setting_image_model_->ShouldShowPromo(web_contents)) {
if (web_contents &&
content_setting_image_model_->ShouldShowPromo(web_contents)) {
// Owned by its native widget. Will be destroyed as its widget is destroyed.
indicator_promo_ = FeaturePromoBubbleView::CreateOwned(
this, views::BubbleBorder::TOP_RIGHT,
......
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