diff --git a/vulkano/src/swapchain/swapchain.rs b/vulkano/src/swapchain/swapchain.rs index 2999bc4b..88eff780 100644 --- a/vulkano/src/swapchain/swapchain.rs +++ b/vulkano/src/swapchain/swapchain.rs @@ -1052,11 +1052,17 @@ impl

Drop for PresentFuture

fn drop(&mut self) { unsafe { if !*self.finished.get_mut() { - // TODO: handle errors? - self.flush().unwrap(); - // Block until the queue finished. - self.queue().unwrap().wait().unwrap(); - self.previous.signal_finished(); + match self.flush() { + Ok(()) => { + // Block until the queue finished. + self.queue().unwrap().wait().unwrap(); + self.previous.signal_finished(); + }, + Err(_) => { + // In case of error we simply do nothing, as there's nothing to do + // anyway. + }, + } } } }