Prevent redundant texture and buffer destroy calls

This commit is contained in:
Kunal Mohan 2020-08-24 16:04:34 +05:30
parent 84185eb1da
commit 851f83c61f
4 changed files with 15 additions and 9 deletions

View file

@ -184,6 +184,7 @@ impl GPUBufferMethods for GPUBuffer {
GPUBufferState::Mapped | GPUBufferState::MappedAtCreation => {
self.Unmap();
},
GPUBufferState::Destroyed => return,
_ => {},
};
if let Err(e) = self