From: GoranKovac <gorankovacstudio@gmail.com> Regression from 10.13 - https://bugs.winehq.org/show_bug.cgi?id=58506 When Waves VST tries to load it errors: 0024:warn:win:get_window_pixel_format getting format on win (nil) not supported 0024:warn:opengl:update_context Failed to re-create context for wglShareLists 0024:warn:opengl:wglMakeCurrent wglMakeCurrent returned 0xc0000005 After that it stucks in the loop and main app (DAW) needs to be SIGTERM. Fix checks if the HDC is valid before going further. This makes Waves VST load and work fine. --- dlls/opengl32/unix_wgl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 09b1bbf063b..d6db3b881d8 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -396,6 +396,11 @@ static struct context *update_context( TEB *teb, HGLRC client_context, struct co if (ctx->tid) return ctx; /* currently in use */ if (ctx->share == (HGLRC)-1) return ctx; /* not re-shared */ + if (!NtUserWindowFromDC( ctx->hdc )) + { + WARN( "Skipping context re-create, invalid HDC\n" ); + return ctx; + } share = ctx->share ? get_updated_context( teb, ctx->share ) : NULL; if (!funcs->p_wgl_context_reset( &ctx->base, ctx->hdc, share ? &share->base : NULL, ctx->attribs )) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9986