Skip to content

Commit

Permalink
Fix AnyDevice drop implementation dropping the wrong thing (gfx-rs#6052)
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
Wumpf authored and cwfitzgerald committed Jul 31, 2024
1 parent e3b5c1a commit 735ecd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/device/any_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>());
}
}

Expand Down

0 comments on commit 735ecd0

Please sign in to comment.