diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/queryobj.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 7a70b592c47..1fa02795c1c 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -766,6 +766,11 @@ get_query_object(struct gl_context *ctx, const char *func, return; } + if (offset < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "%s(offset is negative)", func); + return; + } + switch (pname) { case GL_QUERY_RESULT: case GL_QUERY_RESULT_NO_WAIT: |