Commit d7db024e authored by Greg Turner's avatar Greg Turner Committed by Alexandre Julliard

CreateDC: handle (nil, <string>, ...) gracefully if no driver found.

parent 25bf0826
......@@ -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 )))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment