[go: nahoru, domu]

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

Unified Diff: app/gfx/gl/gl_context_egl.cc
Issue 3549018: Fixed crash when GetClientRect fails.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
« 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: app/gfx/gl/gl_context_egl.cc
===================================================================
--- app/gfx/gl/gl_context_egl.cc (revision 61564)
+++ app/gfx/gl/gl_context_egl.cc (working copy)
@@ -179,7 +179,11 @@
gfx::Size NativeViewEGLContext::GetSize() {
#if defined(OS_WIN)
RECT rect;
- CHECK(GetClientRect(static_cast<HWND>(window_), &rect));
+ if (!GetClientRect(static_cast<HWND>(window_), &rect)) {
+ DCHECK(false) << "GetClientRect failed.";
Ken Russell (switch to Gerrit) 2010/10/06 17:53:49 Given this fix, do you still want to assert in deb
+ return gfx::Size();
+ }
+
return gfx::Size(rect.right - rect.left, rect.bottom - rect.top);
#else
// TODO(piman): This doesn't work correctly on Windows yet, the size doesn't
« 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