Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2825473002: ArcCustomNotificationView: Fix crash in onBlur (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d0c92d9ecf64e1c90308194caa4c6be580e509dc..8afd6fb8b660219dd3d06e453cd4d24a68a8f7ca 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -534,6 +534,11 @@ void ArcCustomNotificationView::OnFocus() {
}
void ArcCustomNotificationView::OnBlur() {
+ if (!parent()) {
+ // OnBlur may be called when this view is being removed.
+ return;
+ }
+
CHECK_EQ(message_center::CustomNotificationView::kViewClassName,
parent()->GetClassName());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698