diff --git a/TitanEngine/Global.Engine.Threading.cpp b/TitanEngine/Global.Engine.Threading.cpp index e7dbb29..32be8c7 100644 --- a/TitanEngine/Global.Engine.Threading.cpp +++ b/TitanEngine/Global.Engine.Threading.cpp @@ -4,7 +4,11 @@ MutexLocker::MutexLocker(const char* name) { - gMutex=CreateMutexA(0, false, name); + int len=strlen(name); + DynBuf newNameBuf(len+20); + char* newName = (char*)newNameBuf.GetPtr(); + sprintf(newName, "%s%X", name, GetCurrentProcessId()); + gMutex=CreateMutexA(0, false, newName); bUnlocked=false; WaitForSingleObject(gMutex, INFINITE); } diff --git a/TitanEngine/TitanEngine.Debugger.cpp b/TitanEngine/TitanEngine.Debugger.cpp index 2f4b3a9..b8f07ed 100644 --- a/TitanEngine/TitanEngine.Debugger.cpp +++ b/TitanEngine/TitanEngine.Debugger.cpp @@ -273,6 +273,8 @@ __declspec(dllexport) bool TITCALL DetachDebugger(DWORD ProcessId) LPVOID funcDebugActiveProcessStop = NULL; bool FuncReturn = false; + RemoveAllBreakPoints(UE_OPTION_REMOVEALL); + if(ProcessId != NULL) { funcDebugActiveProcessStop = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugActiveProcessStop");