mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: add missing error check in _mesa_CallLists()
Generate GL_INVALID_VALUE if n < 0. Return early if n==0 or lists==NULL. v2: fix formatting, also check for lists==NULL. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
b1ddc03633
commit
711d5347cf
1 changed files with 8 additions and 0 deletions
|
|
@ -9105,6 +9105,14 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
|
|||
return;
|
||||
}
|
||||
|
||||
if (n < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glCallLists(n < 0)");
|
||||
return;
|
||||
} else if (n == 0 || lists == NULL) {
|
||||
/* nothing to do */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Save the CompileFlag status, turn it off, execute display list,
|
||||
* and restore the CompileFlag.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue