From: Cwooper <cwooperm@gmail.com> wayland_configure_window() accessed data->rects.window after calling wayland_win_data_release(data). Compute the final window rect while the data is still held, and keep only the RECT local across the release. --- dlls/winewayland.drv/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index 2c3d1f87408..ae89f3c0c09 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -575,6 +575,9 @@ static void wayland_configure_window(HWND hwnd) wayland_surface_coords_to_window(surface, width, height, &window_width, &window_height); + SetRect(&rect, 0, 0, window_width, window_height); + OffsetRect(&rect, data->rects.window.left, data->rects.window.top); + wayland_win_data_release(data); TRACE("processing=%dx%d,%#x\n", width, height, state); @@ -600,8 +603,6 @@ static void wayland_configure_window(HWND hwnd) flags |= SWP_NOSENDCHANGING; } - SetRect(&rect, 0, 0, window_width, window_height); - OffsetRect(&rect, data->rects.window.left, data->rects.window.top); NtUserSetRawWindowPos(hwnd, rect, flags, FALSE); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10487