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:
Richard Feldman 2026-07-08 16:16:28 -04:00
parent 32f2c92e90
commit e807a6efc8
No known key found for this signature in database

View file

@ -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 _),
)
};