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

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

Issue 2823593002: Prevent crash in NativeWidgetAura::IsMouseEventsEnabled() when no root window (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/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 4904f00c228f44d1686a8e7a59ee0e275e82fe82..0a6b3ab5daa80971ab3856a5b7594bfeb9a390c2 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -665,7 +665,7 @@ void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
}
bool NativeWidgetAura::IsMouseEventsEnabled() const {
- if (!window_)
+ if (!window_ || !window_->GetRootWindow())
return false;
aura::client::CursorClient* cursor_client =
aura::client::GetCursorClient(window_->GetRootWindow());
« 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