Skip to content
Snippets Groups Projects
Commit e27a95e9 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard
Browse files

d3dx9: Avoid closing invalid handles.

parent 175a3649
Branches
Tags
No related merge requests found
......@@ -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());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment