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

Unified Diff: ui/views/widget/widget.cc

Issue 1059383003: Make sure observers are not nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « ui/gfx/display_change_notifier_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index e78a45ef5bfe3415688dec93b46aa3c2189fffa8..7c7469391627ca7ef0bd33d7d16bda3fab399be6 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -390,6 +390,8 @@ gfx::NativeWindow Widget::GetNativeWindow() const {
}
void Widget::AddObserver(WidgetObserver* observer) {
+ // Make sure that there is no nullptr in observer list. crbug.com/471649.
+ CHECK(observer);
observers_.AddObserver(observer);
}
« no previous file with comments | « ui/gfx/display_change_notifier_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698