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:
Nikolay Sivov 2016-08-26 13:47:17 +03:00 committed by Alexandre Julliard
parent 392e0c9c7a
commit 1c7a1f8f27
1 changed files with 4 additions and 0 deletions

View File

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