Skip to content

Commit 1d0e7cc

Browse files
bugfix(gui): Prevent use-after-free crashes in WOLWelcomeMenu during shutdown
1 parent 6266009 commit 1d0e7cc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLWelcomeMenu.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,12 @@ WindowMsgHandledType WOLWelcomeMenuSystem( GameWindow *window, UnsignedInt msg,
732732
{
733733
UnicodeString txtInput;
734734

735+
// During shutdown the window hierarchy is being torn down; ignore all
736+
// messages to prevent use-after-free crashes caused by mouse-enter/leave
737+
// events that are still in-flight while the parent window is being destroyed.
738+
if( isShuttingDown )
739+
return MSG_IGNORED;
740+
735741
switch( msg )
736742
{
737743

0 commit comments

Comments
 (0)