mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
r600g: Don't blindly unmap NULL->size.
There may actually be something mapped in that range, especially for large buffers like e.g. the GL Drawable.
This commit is contained in:
parent
04094b2da2
commit
8a878c266a
1 changed files with 3 additions and 1 deletions
|
|
@ -145,7 +145,9 @@ struct radeon_bo *radeon_bo_decref(struct radeon *radeon, struct radeon_bo *bo)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
munmap(bo->data, bo->size);
|
||||
if (bo->map_count) {
|
||||
munmap(bo->data, bo->size);
|
||||
}
|
||||
memset(&args, 0, sizeof(args));
|
||||
args.handle = bo->handle;
|
||||
drmIoctl(radeon->fd, DRM_IOCTL_GEM_CLOSE, &args);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue