mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
CreateDC: handle (nil, <string>, ...) gracefully if no driver found.
This commit is contained in:
parent
25bf08267a
commit
d7db024e3a
@ -559,13 +559,13 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output,
|
||||
const DC_FUNCTIONS *funcs;
|
||||
char buf[300];
|
||||
|
||||
if ((!driver) && (!device))
|
||||
return 0;
|
||||
|
||||
GDI_CheckNotLock();
|
||||
|
||||
if (!device || !DRIVER_GetDriverName( device, buf, sizeof(buf) ))
|
||||
{
|
||||
if (!driver) return 0;
|
||||
strcpy(buf, driver);
|
||||
}
|
||||
|
||||
if (!(funcs = DRIVER_load_driver( buf )))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user