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

Unified Diff: ui/aura/window_targeter.cc

Issue 2165773002: [Chromecast] Fix crash on keypress in cast_shell with Ozone X11 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/aura/window_targeter.cc
diff --git a/ui/aura/window_targeter.cc b/ui/aura/window_targeter.cc
index 1364ab3fb83ccce05ac450e98d83c664ef7cefcf..9853585d3cda3a6a0dddb1503f668abb4b34c7d5 100644
--- a/ui/aura/window_targeter.cc
+++ b/ui/aura/window_targeter.cc
@@ -107,6 +107,8 @@ Window* WindowTargeter::FindTargetForKeyEvent(Window* window,
const ui::KeyEvent& key) {
Window* root_window = window->GetRootWindow();
client::FocusClient* focus_client = client::GetFocusClient(root_window);
+ if (!focus_client)
+ return window;
sadrul 2016/07/20 16:58:36 Should this return nullptr?
halliwell 2016/07/20 17:01:42 tbh I don't understand this code well. But I was
Window* focused_window = focus_client->GetFocusedWindow();
if (!focused_window)
return window;
« 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