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

commit ba006b3d497cade418ceae0d3fb4686d9eab3102
Author:     Kyle Katarn <cont...@kcsoftwares.com>
AuthorDate: Wed Aug 26 18:56:52 2020 +0200
Commit:     GitHub <nore...@github.com>
CommitDate: Wed Aug 26 19:56:52 2020 +0300

    [OPENGL32] Remove Err Log Spam from wglMakeCurrent in nominal cases (#3096)
    
    CORE-17224
---
 dll/opengl/opengl32/wgl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dll/opengl/opengl32/wgl.c b/dll/opengl/opengl32/wgl.c
index 92d62e91b77..67be0c52dd4 100644
--- a/dll/opengl/opengl32/wgl.c
+++ b/dll/opengl/opengl32/wgl.c
@@ -742,9 +742,13 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
     else
     {
         /* Winetest conformance */
-        if (GetObjectType( hdc ) != OBJ_DC && GetObjectType( hdc ) != 
OBJ_MEMDC)
+        DWORD objType = GetObjectType(hdc);
+        if (objType != OBJ_DC && objType != OBJ_MEMDC)
         {
-            ERR( "Error: hdc is not a DC handle!\n");
+            if (hdc)
+            {
+                ERR("hdc (%p) is not a DC handle (ObjectType: %d)!\n", hdc, 
objType);
+            }
             SetLastError( ERROR_INVALID_HANDLE );
             return FALSE;
         }

Reply via email to