mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Merge pull request #681 from tomaka/present-error-ignored
Ignore errors when destroying a present future
This commit is contained in:
commit
8938d29eee
@ -1052,11 +1052,17 @@ impl<P> Drop for PresentFuture<P>
|
||||
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.
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user