Fix Drop assertion for WebGLBuffer

A buffer that is dropped may not have been marked for deletion but it
must not be attached to any VAO.
This commit is contained in:
Anthony Ramine 2018-08-26 03:31:24 +02:00
parent 59b3f0458e
commit cb2f83cf8e
3 changed files with 5 additions and 4 deletions

View file

@ -154,6 +154,7 @@ impl WebGLBuffer {
impl Drop for WebGLBuffer {
fn drop(&mut self) {
self.delete();
self.mark_for_deletion();
assert!(self.is_deleted());
}
}