From fdde51580d9ea736b2171efd84c9c3eefca81505 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 16 Oct 2013 19:45:22 +0200 Subject: [PATCH] winex11: Clear the thread data explicitly on detach. --- dlls/winex11.drv/x11drv_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 7b730ca70a2..a6572bae72e 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -609,6 +609,8 @@ static void thread_detach(void) if (data->font_set) XFreeFontSet( data->display, data->font_set ); XCloseDisplay( data->display ); HeapFree( GetProcessHeap(), 0, data ); + /* clear data in case we get re-entered from user32 before the thread is truly dead */ + TlsSetValue( thread_data_tls_index, NULL ); } } -- 2.11.4.GIT