From: Patrick Rudolph <s...@das-labor.org> Reviewed-by: Axel Davy <axel.d...@ens.fr> Signed-off-by: Patrick Rudolph <s...@das-labor.org> --- src/gallium/state_trackers/nine/vertexdeclaration9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.c b/src/gallium/state_trackers/nine/vertexdeclaration9.c index 4aea116..08b95e2 100644 --- a/src/gallium/state_trackers/nine/vertexdeclaration9.c +++ b/src/gallium/state_trackers/nine/vertexdeclaration9.c @@ -192,7 +192,7 @@ NineVertexDeclaration9_ctor( struct NineVertexDeclaration9 *This, This->decls = CALLOC(This->nelems+1, sizeof(D3DVERTEXELEMENT9)); This->elems = CALLOC(This->nelems, sizeof(struct pipe_vertex_element)); This->usage_map = CALLOC(This->nelems, sizeof(uint16_t)); - if (!This->decls || !This->elems) { return E_OUTOFMEMORY; } + if (!This->decls || !This->elems || !This->usage_map) { return E_OUTOFMEMORY; } memcpy(This->decls, pElements, sizeof(D3DVERTEXELEMENT9)*(This->nelems+1)); for (i = 0; i < This->nelems; ++i) { -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev