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

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

Issue 2047083002: Do not allow NULL to be passed into FocusManager::ViewRemoved. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not allow NULL at all Created 4 years, 6 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/views/focus/focus_manager.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 3de91f7b5175a13237f5df26fd6a347ebc3a6b1d..62b4b56680940483f338c2a56a1222da3279f264 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -1068,7 +1068,7 @@ void Widget::OnNativeWidgetCreated(bool desktop_widget) {
void Widget::OnNativeWidgetDestroying() {
// Tell the focus manager (if any) that root_view is being removed
// in case that the focused view is under this root view.
- if (GetFocusManager())
+ if (GetFocusManager() && root_view_)
GetFocusManager()->ViewRemoved(root_view_.get());
FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetDestroying(this));
if (non_client_view_)
« no previous file with comments | « ui/views/focus/focus_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698