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

# Conflicts:
#	CHANGELOG.md
This commit is contained in:
Andreas Reich 2024-07-26 10:31:36 +02:00 committed by Connor Fitzgerald
parent e3b5c1a33f
commit 735ecd035e
No known key found for this signature in database
GPG Key ID: CF0A1F83B4E1A995
2 changed files with 2 additions and 1 deletions

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)

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>>());
}
}