Skip to content

Commit

Permalink
Cast ptr to Device not Surface (#5640)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev authored and ErichDonGubler committed May 18, 2024
1 parent c81ac93 commit 5f35750
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Bottom level categories:

#### General

- Clean up weak references to texture views and bind groups. By @xiaopengli89 [#5595](https://github.com/gfx-rs/wgpu/pull/5595).
- Clean up weak references to texture views and bind groups. By @xiaopengli89 in [#5595](https://github.com/gfx-rs/wgpu/pull/5595).
- Fix segfault on exit is queue & device are dropped before surface. By @sagudev in [#5640](https://github.com/gfx-rs/wgpu/pull/5640).

#### Vulkan

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::Surface>());
_ = Arc::from_raw(ptr.cast::<A::Device>());
}
}

Expand Down

0 comments on commit 5f35750

Please sign in to comment.