Handle CreateMetaFileW(NULL) correctly.
This commit is contained in:
parent
f7f7bd0cfe
commit
69ac76d050
|
@ -263,6 +263,8 @@ HDC WINAPI CreateMetaFileW(LPCWSTR filename)
|
||||||
DWORD len;
|
DWORD len;
|
||||||
HDC hReturnDC;
|
HDC hReturnDC;
|
||||||
|
|
||||||
|
if (!filename) return CreateMetaFileA(NULL);
|
||||||
|
|
||||||
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
|
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
|
||||||
filenameA = HeapAlloc( GetProcessHeap(), 0, len );
|
filenameA = HeapAlloc( GetProcessHeap(), 0, len );
|
||||||
WideCharToMultiByte( CP_ACP, 0, filename, -1, filenameA, len, NULL, NULL );
|
WideCharToMultiByte( CP_ACP, 0, filename, -1, filenameA, len, NULL, NULL );
|
||||||
|
|
Loading…
Reference in New Issue