aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpubuffer.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-08-24 16:04:34 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-08-25 11:07:25 +0530
commit851f83c61fc51d30c79e6ea5f9e521c81d3e5461 (patch)
tree43b4000f36f81419803566694e1f1f47dc061cfd /components/script/dom/gpubuffer.rs
parent84185eb1daf1420597f38a77e40ed3baedb5d521 (diff)
downloadservo-851f83c61fc51d30c79e6ea5f9e521c81d3e5461.tar.gz
servo-851f83c61fc51d30c79e6ea5f9e521c81d3e5461.zip
Prevent redundant texture and buffer destroy calls
Diffstat (limited to 'components/script/dom/gpubuffer.rs')
-rw-r--r--components/script/dom/gpubuffer.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/dom/gpubuffer.rs b/components/script/dom/gpubuffer.rs
index 2d721465e68..60a6075cb7f 100644
--- a/components/script/dom/gpubuffer.rs
+++ b/components/script/dom/gpubuffer.rs
@@ -184,6 +184,7 @@ impl GPUBufferMethods for GPUBuffer {
GPUBufferState::Mapped | GPUBufferState::MappedAtCreation => {
self.Unmap();
},
+ GPUBufferState::Destroyed => return,
_ => {},
};
if let Err(e) = self