[OPENGL32] Do not crash in IntGetCurrentDC if thread data was not allocated.
authorMark Jansen <mark.jansen@reactos.org>
Sun, 5 Nov 2017 20:23:55 +0000 (21:23 +0100)
committerMark Jansen <mark.jansen@reactos.org>
Fri, 17 Nov 2017 18:34:06 +0000 (19:34 +0100)
CORE-12232

dll/opengl/opengl32/opengl32.h

index b3e0bd0..68e5a86 100644 (file)
@@ -154,7 +154,7 @@ HDC
 IntGetCurrentDC(void)
 {
     struct Opengl32_ThreadData* data = TlsGetValue(OglTlsIndex);
-    return data->hdc;
+    return data ? data->hdc : NULL;
 }
 
 static inline