summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/nine/vertexdeclaration9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/vertexdeclaration9.c')
-rw-r--r--src/gallium/state_trackers/nine/vertexdeclaration9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.c b/src/gallium/state_trackers/nine/vertexdeclaration9.c
index 4aea1169be3..08b95e22fc4 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) {