Skip to content
Snippets Groups Projects
Commit d7db024e authored by Gregory M. Turner's avatar Gregory M. Turner Committed by Alexandre Julliard
Browse files

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

parent 25bf0826
No related branches found
No related tags found
No related merge requests found
......@@ -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 )))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment