Fix AnyDevice drop implementation dropping the wrong thing (#6052)

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Andreas Reich authored and Connor Fitzgerald committed 2024-07-31 16:41:27 -04:00
1 parent e3b5c1a33f
commit 735ecd035e
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -44,6 +44,7 @@ Bottom level categories:
#### General
- Fix function for checking bind compatibility to error instead of panic. By @sagudev [#6012](https://github.com/gfx-rs/wgpu/pull/6012)
- Fix crash when dropping the surface after the device. By @wumpf in [#6052](https://github.com/gfx-rs/wgpu/pull/6052)
## 22.0.0 (2024-07-17)
+1 -1
View File
@@ -34,7 +34,7 @@ impl AnyDevice {
unsafe fn drop_glue<A: HalApi>(ptr: *mut ()) {
// Drop the arc this instance is holding.
unsafe {
_ = Arc::from_raw(ptr.cast::<A::Device>());
_ = Arc::from_raw(ptr.cast::<Device<A>>());
}
}