Handle WindowSurface::checkForResize() errors gracefully
WindowSurface::checkForResize() contained an assert which got
triggered in some tests. In order to avoid this issue, this cl
gracefully handles an invalid window handle.
Change-Id: I6bace88370980e94676d4af9de0d88e561175835
Reviewed-on: https://swiftshader-review.googlesource.com/12808
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/OpenGL/libEGL/Surface.cpp b/src/OpenGL/libEGL/Surface.cpp
index 8cb3b39..b3616b1 100644
--- a/src/OpenGL/libEGL/Surface.cpp
+++ b/src/OpenGL/libEGL/Surface.cpp
@@ -278,8 +278,7 @@
RECT client;
if(!GetClientRect(window, &client))
{
- ASSERT(false);
- return false;
+ return error(EGL_BAD_NATIVE_WINDOW, false);
}
int windowWidth = client.right - client.left;