diff options
Diffstat (limited to 'src/intel/intel_driver.c')
-rw-r--r-- | src/intel/intel_driver.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c index a85ba006..e561725c 100644 --- a/src/intel/intel_driver.c +++ b/src/intel/intel_driver.c @@ -730,6 +730,9 @@ cl_buffer intel_share_image_from_libva(cl_context ctx, intel_bo = intel_driver_share_buffer_from_name((intel_driver_t *)ctx->drv, "shared from libva", bo_name); + if (intel_bo == NULL) + return NULL; + drm_intel_bo_get_tiling(intel_bo, &intel_tiling, &intel_swizzle_mode); image->tiling = get_cl_tiling(intel_tiling); @@ -760,6 +763,9 @@ cl_buffer intel_share_image_from_fd(cl_context ctx, intel_bo = intel_driver_share_buffer_from_fd((intel_driver_t *)ctx->drv, fd, image_size); + if (intel_bo == NULL) + return NULL; + drm_intel_bo_get_tiling(intel_bo, &intel_tiling, &intel_swizzle_mode); image->tiling = get_cl_tiling(intel_tiling); |