summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-18 09:07:10 +0100
committerGitHub <noreply@github.com>2022-02-18 09:07:10 +0100
commit488116e4d8f12b78b44e4e9d83228e1598102d8a (patch)
treef4fd535f43fe72cd82bf069beb3a379299fe9f30 /servers/rendering/renderer_rd
parent3a008fc1a2fcd02ddd7c47a2d3535f54ceebd435 (diff)
parent0c27667124627559e60e179282bf9988f091c92a (diff)
Merge pull request #58236 from bruvzg/win_min_fix
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/renderer_compositor_rd.cpp3
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);