| Index: ui/arc/notification/arc_custom_notification_view.cc
|
| diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
|
| index 3e927c583f21c0de73a9a74685faa97de0f7e96b..b1588fce5c6ee8e970e22a2e9238ae6c64e4694c 100644
|
| --- a/ui/arc/notification/arc_custom_notification_view.cc
|
| +++ b/ui/arc/notification/arc_custom_notification_view.cc
|
| @@ -310,12 +310,14 @@ void ArcCustomNotificationView::ViewHierarchyChanged(
|
| if (!details.is_add) {
|
| // Resets slide helper when this view is removed from its parent.
|
| slide_helper_.reset();
|
| - }
|
|
|
| - // Bail if native_view() has attached to a different widget.
|
| - if (widget && native_view() &&
|
| - views::Widget::GetTopLevelWidgetForNativeView(native_view()) != widget) {
|
| - return;
|
| + // Bail if this view is no longer attached to a widget or native_view() has
|
| + // attached to a different widget.
|
| + if (!widget || (native_view() &&
|
| + views::Widget::GetTopLevelWidgetForNativeView(
|
| + native_view()) != widget)) {
|
| + return;
|
| + }
|
| }
|
|
|
| views::NativeViewHost::ViewHierarchyChanged(details);
|
|
|