From 2a4ead5e0f3be4237a9759d579b3afff4783f59e Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Thu, 12 Mar 2020 11:13:20 +0800 Subject: [PATCH] Call `ThrowAwayMessages` when failed to create a main window. --- src/gui/window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/window.c b/src/gui/window.c index d460de23..dad2abee 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -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 ();