dwrite: Fail stream creation on file mapping failure.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
392e0c9c7a
commit
1c7a1f8f27
|
@ -4501,6 +4501,10 @@ static HRESULT WINAPI localfontfileloader_CreateStreamFromKey(IDWriteLocalFontFi
|
|||
|
||||
file_ptr = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0);
|
||||
CloseHandle(mapping);
|
||||
if (!file_ptr) {
|
||||
ERR("mapping failed, file size %s, error %d\n", wine_dbgstr_longlong(size.QuadPart), GetLastError());
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
stream = heap_alloc(sizeof(*stream));
|
||||
if (!stream) {
|
||||
|
|
Loading…
Reference in New Issue