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

This commit is contained in:
Greg Turner 2002-10-02 18:33:21 +00:00 committed by Alexandre Julliard
parent 25bf08267a
commit d7db024e3a
1 changed files with 3 additions and 3 deletions

View File

@ -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 )))
{