diff --git a/TitanEngine/TitanEngine.Debugger.Control.cpp b/TitanEngine/TitanEngine.Debugger.Control.cpp index 5a749a6..6a05066 100644 --- a/TitanEngine/TitanEngine.Debugger.Control.cpp +++ b/TitanEngine/TitanEngine.Debugger.Control.cpp @@ -25,14 +25,10 @@ __declspec(dllexport) void TITCALL ForceClose() int libcount = (int)hListLibrary.size(); for(int i = 0; i < libcount; i++) { - if(hListLibrary.at(i).hFile != (HANDLE) - 1) + if(hListLibrary.at(i).hFileMappingView != NULL) { - if(hListLibrary.at(i).hFileMappingView != NULL) - { - UnmapViewOfFile(hListLibrary.at(i).hFileMappingView); - EngineCloseHandle(hListLibrary.at(i).hFileMapping); - } - EngineCloseHandle(hListLibrary.at(i).hFile); + UnmapViewOfFile(hListLibrary.at(i).hFileMappingView); + EngineCloseHandle(hListLibrary.at(i).hFileMapping); } } ClearLibraryList(); diff --git a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp index 5ae277b..4479194 100644 --- a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp +++ b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp @@ -257,7 +257,6 @@ __declspec(dllexport) void TITCALL DebugLoop() hListLibraryFirst = false; LIBRARY_ITEM_DATAW NewLibraryData; memset(&NewLibraryData, 0, sizeof(LIBRARY_ITEM_DATAW)); - NewLibraryData.hFile = DBGEvent.u.LoadDll.hFile; NewLibraryData.BaseOfDll = DBGEvent.u.LoadDll.lpBaseOfDll; hFileMapping = DBGEvent.u.LoadDll.hFile ? CreateFileMappingA(DBGEvent.u.LoadDll.hFile, NULL, PAGE_READONLY, 0, 0, NULL) : NULL; if(hFileMapping != NULL) @@ -375,8 +374,7 @@ __declspec(dllexport) void TITCALL DebugLoop() //maintain library list for(unsigned int i = 0; i < hListLibrary.size(); i++) { - if(hListLibrary.at(i).BaseOfDll == DBGEvent.u.UnloadDll.lpBaseOfDll && - hListLibrary.at(i).hFile != INVALID_HANDLE_VALUE) + if(hListLibrary.at(i).BaseOfDll == DBGEvent.u.UnloadDll.lpBaseOfDll) { if(hListLibrary.at(i).hFileMappingView != NULL) {