diff --git a/dll/opengl/opengl32/wgl.c b/dll/opengl/opengl32/wgl.c index 213b8b40768..579008323a7 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; }