From fa9ce98d8e19526200e8c38dd5e418ddee14b692 Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 5 Nov 2017 21:23:55 +0100 Subject: [PATCH] [OPENGL32] Do not crash in IntGetCurrentDC if thread data was not allocated. CORE-12232 --- dll/opengl/opengl32/opengl32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/opengl/opengl32/opengl32.h b/dll/opengl/opengl32/opengl32.h index b3e0bd08f8f..68e5a86672c 100644 --- a/dll/opengl/opengl32/opengl32.h +++ b/dll/opengl/opengl32/opengl32.h @@ -154,7 +154,7 @@ HDC IntGetCurrentDC(void) { struct Opengl32_ThreadData* data = TlsGetValue(OglTlsIndex); - return data->hdc; + return data ? data->hdc : NULL; } static inline