Just to make sure, properly initialize handle values in Minidump class.

This commit is contained in:
/dev/urandom 2016-08-29 07:35:33 +02:00
parent 050f867288
commit 07aaf58f97
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -7,7 +7,10 @@ namespace Components
{
#pragma region Minidump class implementation
inline Minidump::Minidump() {}
Minidump::Minidump()
{
this->fileHandle = this->mapFileHandle = INVALID_HANDLE_VALUE;
}
Minidump::~Minidump()
{
@ -110,7 +113,7 @@ namespace Components
if (this->mapFileHandle == NULL || this->mapFileHandle == INVALID_HANDLE_VALUE)
{
this->mapFileHandle = CreateFileMappingA(this->fileHandle, NULL, PAGE_READONLY, 0, 0, NULL);
if (this->mapFileHandle == NULL)
if (this->mapFileHandle == NULL || this->mapFileHandle == INVALID_HANDLE_VALUE)
{
Utils::OutputDebugLastError();
return false;