Skip to content

Commit 0e96cb8

Browse files
committed
Fix FreeExternalTexture
1 parent 2385467 commit 0e96cb8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

player/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ impl Player {
157157
self.external_textures.insert(id, external_texture);
158158
}
159159
Action::FreeExternalTexture(id) => {
160+
// Note: external texture remains in the HashMap. "Free" and "Destroy"
161+
// mean the opposite from WebGPU.
160162
let external_texture = self
161163
.external_textures
162-
.remove(&id)
164+
.get(&id)
163165
.expect("invalid external texture");
164166
external_texture.destroy();
165167
}

0 commit comments

Comments
 (0)