diff --git a/src/frontend-common/vulkan_host_display.cpp b/src/frontend-common/vulkan_host_display.cpp index dc936f84a..f28a71ad4 100644 --- a/src/frontend-common/vulkan_host_display.cpp +++ b/src/frontend-common/vulkan_host_display.cpp @@ -684,6 +684,13 @@ bool VulkanHostDisplay::RenderScreenshot(u32 width, u32 height, std::vector break; } + // if we don't have a texture (display off), then just write out nothing. + if (!HasDisplayTexture()) + { + std::fill(out_pixels->begin(), out_pixels->end(), static_cast(0)); + return true; + } + Vulkan::Texture tex; Vulkan::StagingTexture staging_tex; if (!tex.Create(width, height, 1, 1, format, VK_SAMPLE_COUNT_1_BIT, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_TILING_OPTIMAL,