gdi32: Fix CreateCompatibleDC to reject invalid DCs.
This commit is contained in:
parent
2004d2b2f6
commit
0482c8e818
|
@ -785,6 +785,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
|
|||
release_dc_ptr( origDC );
|
||||
if (funcs) funcs = DRIVER_get_driver( funcs );
|
||||
}
|
||||
else if (hdc) return 0;
|
||||
|
||||
if (!funcs && !(funcs = DRIVER_load_driver( displayW ))) return 0;
|
||||
|
||||
|
|
|
@ -248,15 +248,11 @@ static void test_CreateCompatibleDC(void)
|
|||
bRet = DeleteDC(hDC);
|
||||
ok(bRet == TRUE, "DeleteDC returned %u\n", bRet);
|
||||
|
||||
todo_wine
|
||||
{
|
||||
/* Try to create a DC compatible to the deleted DC. This has to fail */
|
||||
hNewDC = CreateCompatibleDC(hDC);
|
||||
ok(hNewDC == NULL, "CreateCompatibleDC returned %p\n", hNewDC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
START_TEST(dc)
|
||||
{
|
||||
test_savedc();
|
||||
|
|
Loading…
Reference in New Issue