From d69d15630e33a9fbb41ed1c22526d96302bb1156 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Tue, 4 Jan 2022 19:06:18 +0100 Subject: [PATCH] space: make render error check more readable --- src/desktop/space/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/desktop/space/mod.rs b/src/desktop/space/mod.rs index bd38ee8..a737c74 100644 --- a/src/desktop/space/mod.rs +++ b/src/desktop/space/mod.rs @@ -498,7 +498,7 @@ impl Space { } let output_transform: Transform = output.current_transform().into(); - if let Err(err) = renderer.render( + let res = renderer.render( output_transform .transform_size(output_size) .to_f64() @@ -559,7 +559,9 @@ impl Space { Result::<(), R::Error>::Ok(()) }, - ) { + ); + + if let Err(err) = res { // if the rendering errors on us, we need to be prepared, that this whole buffer was partially updated and thus now unusable. // thus clean our old states before returning state.old_damage = VecDeque::new();