diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp index d5ed613a38f..b7cce544742 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp @@ -749,7 +749,11 @@ static GameWindow* findWindow(GameWindow *parent, AsciiString baseWindow, AsciiS AsciiString fullPath; fullPath.format("%s:%s", baseWindow.str(), gadgetName.str()); GameWindow *res = TheWindowManager->winGetWindowFromId(parent, NAMEKEY(fullPath)); - DEBUG_ASSERTLOG(res, ("Cannot find window %s", fullPath.str())); + // Log if window not found but don't assert - windows may not be initialized yet + if (!res) + { + DEBUG_LOG(("findWindow: Cannot find window %s (may not be initialized yet)", fullPath.str())); + } return res; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp index d93e942ec02..790a6f574b3 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupPlayerInfo.cpp @@ -831,7 +831,11 @@ static GameWindow* findWindow(GameWindow *parent, AsciiString baseWindow, AsciiS AsciiString fullPath; fullPath.format("%s:%s", baseWindow.str(), gadgetName.str()); GameWindow *res = TheWindowManager->winGetWindowFromId(parent, NAMEKEY(fullPath)); - DEBUG_ASSERTLOG(res, ("Cannot find window %s", fullPath.str())); + // Log if window not found but don't assert - windows may not be initialized yet + if (!res) + { + DEBUG_LOG(("findWindow: Cannot find window %s (may not be initialized yet)", fullPath.str())); + } return res; } @@ -1609,4 +1613,4 @@ static void messageBoxYes( void ) RefreshGameListBoxes(); GameSpyCloseOverlay(GSOVERLAY_PLAYERINFO); -} +}