Use a critical section to guard the GuiTranslateText (#1011)
* Translate some strings and export memiscodepage. * fixed memory leaks in watch view * warn the user if the breakpoint is not executable * use dbgfunctions * remove unused exports * fix * fix * guard translate function with critical section * DeleteCriticalSection
This commit is contained in:
parent
c076aa583c
commit
bdefeea0ad
|
|
@ -107,6 +107,7 @@ BRIDGE_IMPEXP const wchar_t* BridgeStart()
|
|||
return L"Failed to save settings!";
|
||||
_dbg_sendmessage(DBG_DEINITIALIZE_LOCKS, nullptr, nullptr); //deinitialize locks when only one thread is left (hopefully)
|
||||
DeleteCriticalSection(&csIni);
|
||||
DeleteCriticalSection(&csTranslate);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1487,7 +1488,10 @@ BRIDGE_IMPEXP void GuiFoldDisassembly(duint startAddress, duint length)
|
|||
|
||||
BRIDGE_IMPEXP const char* GuiTranslateText(const char* Source)
|
||||
{
|
||||
return _gui_translate_text(Source);
|
||||
EnterCriticalSection(&csTranslate);
|
||||
const char* text = _gui_translate_text(Source);
|
||||
LeaveCriticalSection(&csTranslate);
|
||||
return text;
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
|
|
|
|||
Loading…
Reference in New Issue