anv: fix null pointer dereference

CID: 1419033

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Tapani Pälli
2017-10-09 08:17:15 +03:00
parent 4adc456580
commit 63e6db18c5

View File

@@ -577,6 +577,7 @@ static void anv_image_bind_memory_plane(struct anv_device *device,
if (!memory) { if (!memory) {
image->planes[plane].bo = NULL; image->planes[plane].bo = NULL;
image->planes[plane].bo_offset = 0; image->planes[plane].bo_offset = 0;
return;
} }
image->planes[plane].bo = memory->bo; image->planes[plane].bo = memory->bo;