diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-01 17:20:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-01 17:30:38 +0100 |
commit | 67e8ac365c4b7dd9c4eb2abe46aecc8cc04d4278 (patch) | |
tree | a950333b1bf028d80527ba25cd92ec651c43c16f /src/sna/gen6_render.c | |
parent | e91b27ae14a5366175a4fe9c87ee15a0a25b5a42 (diff) |
sna/gen3+: Guard against a kgem_bo_destroy(NULL)
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r-- | src/sna/gen6_render.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index d9068de7..df2eeb2e 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -967,7 +967,8 @@ static int gen6_vertex_finish(struct sna *sna) if (sna->render.vbo) sna->render.vertices = kgem_bo_map(&sna->kgem, sna->render.vbo); if (sna->render.vertices == NULL) { - kgem_bo_destroy(&sna->kgem, sna->render.vbo); + if (sna->render.vbo) + kgem_bo_destroy(&sna->kgem, sna->render.vbo); sna->render.vbo = NULL; return 0; } |