mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
gpui_windows: Give the window-create pointer mutable provenance
The WndProc recovers the CreateWindowExW lpParam as *mut WindowCreateContext and writes through it, but the pointer was derived from a shared reference, so it lacked mutable provenance. Derive it from &raw mut instead.
This commit is contained in:
parent
32f2c92e90
commit
e807a6efc8
1 changed files with 4 additions and 1 deletions
|
|
@ -537,7 +537,10 @@ impl WindowsWindow {
|
|||
parent_hwnd,
|
||||
None,
|
||||
Some(hinstance.into()),
|
||||
Some(&context as *const _ as *const _),
|
||||
// The `WndProc` recovers this as `*mut WindowCreateContext` and writes
|
||||
// through it (setting `inner`), so the pointer must carry mutable
|
||||
// provenance. Derive it from `&raw mut` rather than a shared reference.
|
||||
Some(&raw mut context as *const _),
|
||||
)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue