mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-25 16:25:25 +00:00
Don't panic when destroying debug utils (#79)
* Don't panic when destroying debug utils * Use zip instead of two branches Co-authored-by: Jasper Bekkers <Jasper-Bekkers@users.noreply.github.com> Co-authored-by: Jasper Bekkers <bekkers@gmail.com>
This commit is contained in:
parent
bba88ccfad
commit
7258a7c236
@ -631,13 +631,13 @@ impl Drop for ExampleBase {
|
||||
.destroy_swapchain(self.swapchain, None);
|
||||
self.device.destroy_device(None);
|
||||
self.surface_loader.destroy_surface(self.surface, None);
|
||||
// just let them leak for now
|
||||
/*
|
||||
self.debug_utils_loader
|
||||
.take()
|
||||
.unwrap()
|
||||
.destroy_debug_utils_messenger(self.debug_call_back.take().unwrap(), None);
|
||||
*/
|
||||
|
||||
if let Some((debug_utils, call_back)) =
|
||||
Option::zip(self.debug_utils_loader.take(), self.debug_call_back.take())
|
||||
{
|
||||
debug_utils.destroy_debug_utils_messenger(call_back, None);
|
||||
}
|
||||
|
||||
self.instance.destroy_instance(None);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user