Commit 66cdf9ba authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Fix crash caused by notification removal during animation.

A notification icon which is already in the process of being
animated out of the stacked notfication bar should not be
removed in OnNotificationRemoved.

Bug: 1069667
Change-Id: If8f04d44afab5d5b76e8dd7082fcdcc56ebca35d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150008Reviewed-by: default avatarTim Song <tengs@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759157}
parent a842c622
......@@ -523,7 +523,7 @@ void StackedNotificationBar::OnNotificationAdded(const std::string& id) {
void StackedNotificationBar::OnNotificationRemoved(const std::string& id,
bool by_user) {
const StackedNotificationBarIcon* icon = GetIconFromId(id);
if (icon) {
if (icon && !icon->is_animating_out()) {
delete icon;
stacked_notification_count_--;
}
......
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