From df92b1b8843f4a47ededd2243695a2f609f94318 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Tue, 12 Jul 2022 21:08:04 +0200 Subject: [PATCH] [RENDERER] Remove error when no state loaded --- src/render/renderer/renderer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/render/renderer/renderer.rs b/src/render/renderer/renderer.rs index 8ae98a2..b170676 100644 --- a/src/render/renderer/renderer.rs +++ b/src/render/renderer/renderer.rs @@ -107,11 +107,10 @@ impl Renderer { if let Some(state) = self.state.as_mut() { state.render(&view, &mut encoder)?; + self.queue.submit(iter::once(encoder.finish())); + output.present(); } - self.queue.submit(iter::once(encoder.finish())); - output.present(); - Ok(()) }