diff options
author | Alex Deucher <[email protected]> | 2009-05-26 11:13:44 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-05-26 11:13:44 -0400 |
commit | 17417fc8eeaf5f88452fa3d37a763cee3c92a28c (patch) | |
tree | 190b00c5bd7dec72c24c71a8bebfaa7430d5db2f /src/mesa/drivers/dri/r600/r600_emit.c | |
parent | 4a28974cf59e12f1296526802a4ed3e7160671e4 (diff) |
fix segfault when running glxinfo
Diffstat (limited to 'src/mesa/drivers/dri/r600/r600_emit.c')
-rw-r--r-- | src/mesa/drivers/dri/r600/r600_emit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_emit.c b/src/mesa/drivers/dri/r600/r600_emit.c index dee4cd3435f..e4ba656ee84 100644 --- a/src/mesa/drivers/dri/r600/r600_emit.c +++ b/src/mesa/drivers/dri/r600/r600_emit.c @@ -234,8 +234,10 @@ GLboolean r600DeleteShader(GLcontext * ctx, { struct radeon_bo * pbo = (struct radeon_bo *)shaderbo; - radeon_bo_unmap(pbo); - radeon_bo_unref(pbo); /* when bo->cref <= 0, bo will be bo_free */ + if (pbo) { + radeon_bo_unmap(pbo); + radeon_bo_unref(pbo); /* when bo->cref <= 0, bo will be bo_free */ + } return GL_TRUE; } |