Fixed handle leak when failed to get the image file size.

This commit is contained in:
spx 2011-11-26 04:41:50 +00:00
parent 3c1338b4c5
commit e56273113d

View File

@ -358,6 +358,11 @@ void CTintedImage::LoadImage(const std::wstring& imageName, bool bLoadAlways)
else else
{ {
LogWithArgs(LOG_ERROR, L"%s: Unable to open: %s", m_ConfigName.c_str(), filename.c_str()); LogWithArgs(LOG_ERROR, L"%s: Unable to open: %s", m_ConfigName.c_str(), filename.c_str());
if (fileHandle != INVALID_HANDLE_VALUE)
{
CloseHandle(fileHandle);
}
DisposeImage(); DisposeImage();
} }
} }