summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vrend_renderer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 78792d7..80641c2 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -1642,6 +1642,10 @@ int vrend_create_vertex_elements_state(struct vrend_context *ctx,
memcpy(&v->elements[i].base, &elements[i], sizeof(struct pipe_vertex_element));
desc = util_format_description(elements[i].src_format);
+ if (!desc) {
+ FREE(v);
+ return EINVAL;
+ }
type = GL_FALSE;
if (desc->channel[0].type == UTIL_FORMAT_TYPE_FLOAT) {