diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-02-17 13:09:17 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-02-17 13:34:08 +0200 |
commit | 0c27667124627559e60e179282bf9988f091c92a (patch) | |
tree | 7c7194e9fcd541b93e06aeb7ab1ff486dbb4eb29 /servers/rendering/renderer_rd/renderer_compositor_rd.cpp | |
parent | b89b1683d4a9d17e2c19021643c27d8d580a70b8 (diff) |
[Windows] Fix Vulkan driver crash on sub-window minimization.
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_compositor_rd.cpp')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_compositor_rd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp index 2f8ef696cd..606527ed24 100644 --- a/servers/rendering/renderer_rd/renderer_compositor_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_compositor_rd.cpp @@ -39,6 +39,9 @@ void RendererCompositorRD::prepare_for_blitting_render_targets() { void RendererCompositorRD::blit_render_targets_to_screen(DisplayServer::WindowID p_screen, const BlitToScreen *p_render_targets, int p_amount) { RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin_for_screen(p_screen); + if (draw_list == RD::INVALID_ID) { + return; // Window is minimized and does not have valid swapchain, skip drawing without printing errors. + } for (int i = 0; i < p_amount; i++) { RID texture = storage->render_target_get_texture(p_render_targets[i].render_target); |