aboutsummaryrefslogtreecommitdiff
path: root/render/vulkan/renderer.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-05-31 21:29:04 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-05-31 19:40:59 +0000
commitba276e5ac21ecfa5bf1e3b9c7ae140c4880e2a3a (patch)
tree79f2ba02beabe10a809ebfa3558153bd0317be02 /render/vulkan/renderer.c
parent3f0487d310974f6ff889ca80e4fb4005553814ed (diff)
render/vulkan: handle vulkan_record_stage_cb() failures
Diffstat (limited to 'render/vulkan/renderer.c')
-rw-r--r--render/vulkan/renderer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index f4af9caf..49e28d8f 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -1774,6 +1774,9 @@ static bool vulkan_read_pixels(struct wlr_renderer *wlr_renderer,
}
VkCommandBuffer cb = vulkan_record_stage_cb(vk_renderer);
+ if (cb == VK_NULL_HANDLE) {
+ return false;
+ }
vulkan_change_layout(cb, dst_image,
VK_IMAGE_LAYOUT_UNDEFINED,