mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-23 02:16:33 +11:00
[Windows] Fix use after free during window destruction (#1746)
This commit is contained in:
parent
8aa1be8336
commit
66c117e599
2 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
- **Breaking:** On Windows, include prefix byte in scancodes.
|
- **Breaking:** On Windows, include prefix byte in scancodes.
|
||||||
- On Wayland, fix window not being resizeable when using `with_min_inner_size` in `WindowBuilder`.
|
- On Wayland, fix window not being resizeable when using `with_min_inner_size` in `WindowBuilder`.
|
||||||
- On Unix, fix cross-compiling to wasm32 without enabling X11 or Wayland.
|
- On Unix, fix cross-compiling to wasm32 without enabling X11 or Wayland.
|
||||||
|
- On Windows, fix use after free crash during window destruction.
|
||||||
|
|
||||||
# 0.23.0 (2020-10-02)
|
# 0.23.0 (2020-10-02)
|
||||||
|
|
||||||
|
|
|
@ -810,7 +810,10 @@ unsafe extern "system" fn public_window_callback<T: 'static>(
|
||||||
event: Destroyed,
|
event: Destroyed,
|
||||||
});
|
});
|
||||||
subclass_input.event_loop_runner.remove_window(window);
|
subclass_input.event_loop_runner.remove_window(window);
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
winuser::WM_NCDESTROY => {
|
||||||
drop(subclass_input);
|
drop(subclass_input);
|
||||||
Box::from_raw(subclass_input_ptr as *mut SubclassInput<T>);
|
Box::from_raw(subclass_input_ptr as *mut SubclassInput<T>);
|
||||||
0
|
0
|
||||||
|
|
Loading…
Add table
Reference in a new issue