Skip to content

Commit 53da80a

Browse files
Make sure that no SwitchAndConvert threads are running when closing app
1 parent adb761f commit 53da80a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

recaps.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
142142
if(bShowTrayIcon)
143143
UnregisterClass(WINDOWCLASS_NAME, hInstance);
144144
SaveConfiguration(&g_keyboardInfo);
145+
// Make sure that no SwitchAndConvert threads are running
146+
EnterCriticalSection(&g_csSwitchAndConvert);
147+
LeaveCriticalSection(&g_csSwitchAndConvert);
145148
DeleteCriticalSection(&g_csSwitchAndConvert);
146149
CloseHandle(mutex);
147150

0 commit comments

Comments
 (0)