call mg_FreeMsgQueueForThisThread immediately in TerminateGUI()

This commit is contained in:
Vincent Wei
2022-10-19 19:37:06 +08:00
parent 0adddb422b
commit d787dea652
+2 -2
View File
@@ -617,6 +617,8 @@ void GUIAPI TerminateGUI (int not_used)
{
mg_TerminateTimer (FALSE);
mg_FreeMsgQueueForThisThread (TRUE);
/* Since 5.0.0 */
SendNotifyMessage (HWND_DESKTOP, MSG_ENDSESSION, 0, 0);
pthread_join (__mg_dsk_msg_queue->th, NULL);
@@ -655,8 +657,6 @@ void GUIAPI TerminateGUI (int not_used)
miFreeArcCache ();
#endif
mg_FreeMsgQueueForThisThread (TRUE);
deleteThreadInfoKey ();
mg_TerminateSliceAllocator();