diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 70eaebb453e..8d50092b4c4 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -849,7 +849,8 @@ static void u_vbuf_delete_vertex_elements(struct u_vbuf *mgr, void *cso) struct pipe_context *pipe = mgr->pipe; struct u_vbuf_elements *ve = cso; - pipe->delete_vertex_elements_state(pipe, ve->driver_cso); + if (ve->driver_cso) + pipe->delete_vertex_elements_state(pipe, ve->driver_cso); FREE(ve); }