summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pt_vcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_vcache.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_vcache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache.c b/src/gallium/auxiliary/draw/draw_pt_vcache.c
index b61bb50664..3cc2941f96 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vcache.c
+++ b/src/gallium/auxiliary/draw/draw_pt_vcache.c
@@ -487,6 +487,8 @@ static void vcache_destroy( struct draw_pt_front_end *frontend )
struct draw_pt_front_end *draw_pt_vcache( struct draw_context *draw )
{
struct vcache_frontend *vcache = CALLOC_STRUCT( vcache_frontend );
+ if (vcache == NULL)
+ return NULL;
vcache->base.prepare = vcache_prepare;
vcache->base.run = NULL;