Skip to content

Commit

Permalink
Fix AnyDevice drop implementation dropping the wrong thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jul 26, 2024
1 parent 03f6d24 commit 52ae707
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 @@ -55,6 +55,7 @@ Bottom level categories:
- Print requested and supported usages on `UnsupportedUsage` error. By @VladasZ in [#6007](https://github.com/gfx-rs/wgpu/pull/6007)
- Fix function for checking bind compatibility to error instead of panic. By @sagudev [#6012](https://github.com/gfx-rs/wgpu/pull/6012)
- Deduplicate bind group layouts that are created from pipelines with "auto" layouts. By @teoxoy [#6049](https://github.com/gfx-rs/wgpu/pull/6049)
- Fix crash when dropping the surface after the device. By @wumpf in [#????](https://github.com/gfx-rs/wgpu/pull/????)

### Dependency Updates

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 52ae707

Please sign in to comment.