summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-05-13 14:03:47 +1000
committerDave Airlie <[email protected]>2011-05-13 14:03:47 +1000
commitc7b1497f4ece1f23ef934fa97ad9040350bc0f23 (patch)
tree076028a1f48ce83937ed0390498b40e3a1d685c2 /src/gallium
parent8a506374536497495bac27db6cd15ffd06bb01a2 (diff)
r600g: don't unmap if we haven't mapped
should fix https://bugs.freedesktop.org/show_bug.cgi?id=37157 Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/r600/drm/radeon_bo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c
index 9a534dddf32..cd817fc240b 100644
--- a/src/gallium/winsys/r600/drm/radeon_bo.c
+++ b/src/gallium/winsys/r600/drm/radeon_bo.c
@@ -64,8 +64,10 @@ int radeon_bo_fixed_map(struct radeon *radeon, struct radeon_bo *bo)
static void radeon_bo_fixed_unmap(struct radeon *radeon, struct radeon_bo *bo)
{
- munmap(bo->data, bo->size);
- bo->data = NULL;
+ if (bo->data) {
+ munmap(bo->data, bo->size);
+ bo->data = NULL;
+ }
}
struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,