diff --git a/gapis/api/vulkan/api/image.api b/gapis/api/vulkan/api/image.api index 703955d053..0dc49ab413 100644 --- a/gapis/api/vulkan/api/image.api +++ b/gapis/api/vulkan/api/image.api @@ -783,18 +783,20 @@ sub void transitionImageViewLayout( ref!ImageViewObject view, VkImageLayout oldLayout, VkImageLayout newLayout) { - if is2DView3DImage(view) { - rng := VkImageSubresourceRange( - aspectMask: view.SubresourceRange.aspectMask, - baseMipLevel: view.SubresourceRange.baseMipLevel, - levelCount: view.SubresourceRange.levelCount, - baseArrayLayer: 0, - layerCount: 1) - transitionImageLayout( - view.Image, rng, oldLayout, newLayout) - } else { - transitionImageLayout( - view.Image, view.SubresourceRange, oldLayout, newLayout) + if view != null { + if is2DView3DImage(view) { + rng := VkImageSubresourceRange( + aspectMask: view.SubresourceRange.aspectMask, + baseMipLevel: view.SubresourceRange.baseMipLevel, + levelCount: view.SubresourceRange.levelCount, + baseArrayLayer: 0, + layerCount: 1) + transitionImageLayout( + view.Image, rng, oldLayout, newLayout) + } else { + transitionImageLayout( + view.Image, view.SubresourceRange, oldLayout, newLayout) + } } }