mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
Avoid a crash when the user has enabled glVertex{,Attrib}Pointer but hasn't
filled in a valid pointer for that attribute or vertex array.
This commit is contained in:
parent
216f729a95
commit
37e86254c1
1 changed files with 3 additions and 2 deletions
|
|
@ -699,7 +699,7 @@ static void _ae_update_state( GLcontext *ctx )
|
|||
aa++;
|
||||
}
|
||||
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
|
||||
if (ctx->Array.TexCoord[i].Enabled) {
|
||||
if (ctx->Array.TexCoord[i].Enabled && ctx->Array.TexCoord[i].Ptr) {
|
||||
/* NOTE: we use generic glVertexAttrib functions here.
|
||||
* If we ever de-alias conventional/generic vertex attribs this
|
||||
* will have to change.
|
||||
|
|
@ -714,7 +714,8 @@ static void _ae_update_state( GLcontext *ctx )
|
|||
|
||||
/* generic vertex attribute arrays */
|
||||
for (i = 1; i < VERT_ATTRIB_MAX; i++) { /* skip zero! */
|
||||
if (ctx->Array.VertexAttrib[i].Enabled) {
|
||||
if (ctx->Array.VertexAttrib[i].Enabled &&
|
||||
ctx->Array.VertexAttrib[i].Ptr) {
|
||||
struct gl_client_array *attribArray = &ctx->Array.VertexAttrib[i];
|
||||
at->array = attribArray;
|
||||
/* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue