Jacek Caban (@jacek) commented about dlls/opengl32/wgl.c:
const void *proc; NTSTATUS status;
if (!name) return NULL; + if (!(ctx = context_from_handle( NtCurrentTeb()->glCurrentRC ))) return NULL; + if ((status = UNIX_CALL( wglGetProcAddress, &args ))) WARN( "wglGetProcAddress %s returned %#lx\n", debugstr_a(name), status ); if (args.ret == (void *)-1) return NULL;
+ if (!strncmp( name, "wglGetExtensionsString", 22 )) + { + EnterCriticalSection( &wgl_cs ); + init_wgl_extensions( ctx->base.extensions ); + LeaveCriticalSection( &wgl_cs ); + }
I think you meant to initialize it only once. It's also a weird place to do that, why not do it in the `wglGetExtensionsString*` functions instead? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10019#note_130233