diff --git a/CHANGELOG.md b/CHANGELOG.md index c3c425b5..5f75ec13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - **Breaking:** On Windows, include prefix byte in scancodes. - 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 Windows, fix use after free crash during window destruction. # 0.23.0 (2020-10-02) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index a6d15fb8..27af039f 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -810,7 +810,10 @@ unsafe extern "system" fn public_window_callback( event: Destroyed, }); subclass_input.event_loop_runner.remove_window(window); + 0 + } + winuser::WM_NCDESTROY => { drop(subclass_input); Box::from_raw(subclass_input_ptr as *mut SubclassInput); 0