gdi32: Avoid calling get_dc_ptr on a null handle.
This commit is contained in:
parent
e4e55ed8b4
commit
cc973b0cdc
|
@ -750,8 +750,9 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
|
||||||
|
|
||||||
GDI_CheckNotLock();
|
GDI_CheckNotLock();
|
||||||
|
|
||||||
if ((origDC = get_dc_ptr( hdc )))
|
if (hdc)
|
||||||
{
|
{
|
||||||
|
if (!(origDC = get_dc_ptr( hdc ))) return 0;
|
||||||
if (GetObjectType( hdc ) == OBJ_DC)
|
if (GetObjectType( hdc ) == OBJ_DC)
|
||||||
{
|
{
|
||||||
funcs = origDC->funcs;
|
funcs = origDC->funcs;
|
||||||
|
@ -760,7 +761,6 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
|
||||||
release_dc_ptr( origDC );
|
release_dc_ptr( origDC );
|
||||||
if (funcs) funcs = DRIVER_get_driver( funcs );
|
if (funcs) funcs = DRIVER_get_driver( funcs );
|
||||||
}
|
}
|
||||||
else if (hdc) return 0;
|
|
||||||
|
|
||||||
if (!funcs && !(funcs = DRIVER_load_driver( displayW ))) return 0;
|
if (!funcs && !(funcs = DRIVER_load_driver( displayW ))) return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue