From: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/opengl32/unix_wgl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index a03f8337fbf..c96454c7dbf 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -886,8 +886,15 @@ static void gl_debug_message_callback( GLenum source, GLenum type, GLuint id, GL }; void *ret_ptr; ULONG ret_len; - struct wgl_handle *ptr = (struct wgl_handle *)userParam; + + if (!NtCurrentTeb()) + { + fprintf( stderr, "msg:gl_debug_message_callback called from native thread, serverity %#x, message \"%.*s\".\n", + severity, length, message ); + return; + } + if (!(params.user_callback = ptr->u.context->debug_callback)) return; params.user_data = ptr->u.context->debug_user; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3553