https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa9ce98d8e19526200e8c38dd5e418ddee14b692

commit fa9ce98d8e19526200e8c38dd5e418ddee14b692
Author: Mark Jansen <[email protected]>
AuthorDate: Sun Nov 5 21:23:55 2017 +0100

    [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 b3e0bd08f8..68e5a86672 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

Reply via email to