Fixed CreateDC to work properly when it is called with a device.

This commit is contained in:
Phillip Ezolt 2000-08-01 02:15:34 +00:00 committed by Alexandre Julliard
parent a5910f45bd
commit 3c41fabc6a
1 changed files with 1 additions and 3 deletions

View File

@ -511,9 +511,7 @@ HDC16 WINAPI CreateDC16( LPCSTR driver, LPCSTR device, LPCSTR output,
const DC_FUNCTIONS *funcs; const DC_FUNCTIONS *funcs;
char buf[300]; char buf[300];
if (device) { if (!device || !DRIVER_GetDriverName( device, buf, sizeof(buf) ))
if(!DRIVER_GetDriverName( device, buf, sizeof(buf) )) return 0;
} else
strcpy(buf, driver); strcpy(buf, driver);
if (!(funcs = DRIVER_FindDriver( buf ))) return 0; if (!(funcs = DRIVER_FindDriver( buf ))) return 0;