anv: fix null pointer dereference
authorTapani Pälli <tapani.palli@intel.com>
Mon, 9 Oct 2017 05:17:15 +0000 (08:17 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 10 Oct 2017 05:17:44 +0000 (08:17 +0300)
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>
src/intel/vulkan/anv_image.c

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