commit | 42db9dcea2e6b9f60f07a3e9e2d6fbc196082284 | [log] [tgz] |
---|---|---|
author | Mathias Agopian <mathias@google.com> | Thu Aug 06 20:46:44 2009 -0700 |
committer | Mathias Agopian <mathias@google.com> | Thu Aug 06 20:46:44 2009 -0700 |
tree | d1b51107d0ec6769baea27330b8d27374c8ef538 | |
parent | f9694507ec07e3909f41dba051b1bdbdb66002d8 [diff] [blame] |
better error handling
diff --git a/libs/ui/EGLUtils.cpp b/libs/ui/EGLUtils.cpp index 80bfdfd..b803478 100644 --- a/libs/ui/EGLUtils.cpp +++ b/libs/ui/EGLUtils.cpp
@@ -37,6 +37,9 @@ { EGLint numConfigs = -1, n=0; + if (!attrs) + return BAD_VALUE; + if (outConfig == NULL) return BAD_VALUE; @@ -93,6 +96,10 @@ { int err; int format; + + if (!window) + return BAD_VALUE; + if ((err = window->query(window, NATIVE_WINDOW_FORMAT, &format)) < 0) { return err; }