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

Unified Diff: ui/gfx/screen_mac.mm

Issue 618413002: Check for NULL NativeView in linux/mac Screen::GetDisplayNearestWindow(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment to screen.h Created 6 years, 2 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
Index: ui/gfx/screen_mac.mm
diff --git a/ui/gfx/screen_mac.mm b/ui/gfx/screen_mac.mm
index 11a8b3a4d54a1760c35c2ef0aae4434fdf311124..0b1f41f61d2aee0f9f33c2da94f09b9e5bc07543 100644
--- a/ui/gfx/screen_mac.mm
+++ b/ui/gfx/screen_mac.mm
@@ -127,7 +127,8 @@ class ScreenMac : public gfx::Screen {
gfx::NativeView view) const OVERRIDE {
NSWindow* window = nil;
#if !defined(USE_AURA)
- window = [view window];
+ if (view)
+ window = [view window];
#endif
if (!window)
return GetPrimaryDisplay();

Powered by Google App Engine
This is Rietveld 408576698