From a7ce01f5bbc3964fa6ff34ff83cf599209f75979 Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 03:01:53 +0000 Subject: [PATCH] GUI: Check for null TheWindowManager before creating layouts --- .../Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp | 4 ++-- .../Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp index ceadeb25098..13511a37931 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp @@ -841,7 +841,7 @@ WindowLayout *Shell::getSaveLoadMenuLayout( void ) { // if layout has not been created, create it now - if( m_saveLoadMenuLayout == NULL ) + if( m_saveLoadMenuLayout == NULL && TheWindowManager != NULL ) m_saveLoadMenuLayout = TheWindowManager->winCreateLayout( AsciiString( "Menus/PopupSaveLoad.wnd" ) ); // sanity @@ -858,7 +858,7 @@ WindowLayout *Shell::getPopupReplayLayout( void ) { // if layout has not been created, create it now - if( m_popupReplayLayout == NULL ) + if( m_popupReplayLayout == NULL && TheWindowManager != NULL ) m_popupReplayLayout = TheWindowManager->winCreateLayout( AsciiString( "Menus/PopupReplay.wnd" ) ); // sanity diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp index 991789d311e..b8e82fba853 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp @@ -853,7 +853,7 @@ WindowLayout *Shell::getSaveLoadMenuLayout( void ) { // if layout has not been created, create it now - if( m_saveLoadMenuLayout == NULL ) + if( m_saveLoadMenuLayout == NULL && TheWindowManager != NULL ) m_saveLoadMenuLayout = TheWindowManager->winCreateLayout( AsciiString( "Menus/PopupSaveLoad.wnd" ) ); // sanity @@ -870,7 +870,7 @@ WindowLayout *Shell::getPopupReplayLayout( void ) { // if layout has not been created, create it now - if( m_popupReplayLayout == NULL ) + if( m_popupReplayLayout == NULL && TheWindowManager != NULL ) m_popupReplayLayout = TheWindowManager->winCreateLayout( AsciiString( "Menus/PopupReplay.wnd" ) ); // sanity