fix INVALID_HANDLE_VALUE exception on attach

See:
* https://github.com/x64dbg/x64dbg/issues/1777
* https://github.com/x64dbg/x64dbg/issues/1759
This commit is contained in:
Duncan Ogilvie 2017-12-11 20:50:32 +01:00
parent 719f349b67
commit 4cb07be1f5
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,8 @@ namespace GleeBug
cbLoadDllEvent(loadDll, dll);
//close the file handle
CloseHandle(loadDll.hFile);
if(loadDll.hFile)
CloseHandle(loadDll.hFile);
}
void Debugger::unloadDllEvent(const UNLOAD_DLL_DEBUG_INFO & unloadDll)

View File

@ -39,7 +39,8 @@ namespace GleeBug
cbCreateProcessEvent(createProcess, *mProcess);
//close the file handle
CloseHandle(createProcess.hFile);
if(createProcess.hFile)
CloseHandle(createProcess.hFile);
}
void Debugger::exitProcessEvent(const EXIT_PROCESS_DEBUG_INFO & exitProcess)