From: Rémi Bernon <rbernon(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58448 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58459 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58488 --- dlls/win32u/opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index f27143f3357..5ac9fd72147 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -1152,7 +1152,7 @@ static BOOL context_set_drawables( struct wgl_context *context, void *private, H if (old_read) opengl_drawable_release( old_read ); /* update the current window drawable to the last used draw surface */ - if ((hwnd = NtUserWindowFromDC( draw_hdc ))) set_window_opengl_drawable( hwnd, new_draw ); + if (new_draw && (hwnd = NtUserWindowFromDC( draw_hdc ))) set_window_opengl_drawable( hwnd, new_draw ); } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8674