Call ThrowAwayMessages when failed to create a main window.

This commit is contained in:
Vincent Wei
2020-03-12 11:13:20 +08:00
parent 6f15548dc4
commit 2a4ead5e0f

View File

@@ -3824,6 +3824,9 @@ HWND GUIAPI CreateMainWindowEx (PMAINWINCREATE pCreateInfo,
return (HWND)pWin;
err:
/* BUGFIXING (VM 2020-03-12): merged from 5.0.0 */
ThrowAwayMessages ((HWND)pWin);
#ifdef _MGRM_THREADS
if (pWin->pMessages && pWin->pHosting == NULL) {
mg_FreeMsgQueueThisThread ();