d3dx9: Avoid closing invalid handles.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50373 Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
175a3649ba
commit
e27a95e920
|
@ -134,8 +134,10 @@ HRESULT map_view_of_file(const WCHAR *filename, void **buffer, DWORD *length)
|
|||
return S_OK;
|
||||
|
||||
error:
|
||||
CloseHandle(hmapping);
|
||||
CloseHandle(hfile);
|
||||
if (hmapping)
|
||||
CloseHandle(hmapping);
|
||||
if (hfile != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(hfile);
|
||||
return HRESULT_FROM_WIN32(GetLastError());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue