Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index 7dc8bf460eb1d1c84ac166194e68fa6963e806d3..7edb73cd1be254c879dbec06bfca245ac1253711 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -224,6 +224,11 @@ NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(bool software, |
bool NativeViewGLSurfaceEGL::Initialize() { |
DCHECK(!surface_); |
+ if (!window_) { |
+ LOG(ERROR) << "Trying to create surface without window."; |
+ return false; |
+ } |
+ |
if (!GetDisplay()) { |
LOG(ERROR) << "Trying to create surface with invalid display."; |
return false; |