diff --git a/Core/GameEngine/Include/GameClient/Shell.h b/Core/GameEngine/Include/GameClient/Shell.h index a593f3cbcba..ea9409a0565 100644 --- a/Core/GameEngine/Include/GameClient/Shell.h +++ b/Core/GameEngine/Include/GameClient/Shell.h @@ -131,7 +131,7 @@ class Shell : public SubsystemInterface // pseudo-stack operations for manipulating layouts void push( AsciiString filename, Bool shutdownImmediate = FALSE ); ///< load new screen on top, optionally doing an immediate shutdown void pop(); ///< pop top layout - void popImmediate(); ///< pop now, don't wait for shutdown + void popImmediate( Bool suppressInit = FALSE ); ///< pop now, optionally suppressing init of the uncovered layout void showShell( Bool runInit = TRUE ); ///< init the top of stack void hideShell(); ///< shutdown the top of stack WindowLayout *top(); ///< return top layout @@ -166,7 +166,7 @@ class Shell : public SubsystemInterface void unlinkScreen( WindowLayout *screen ); ///< remove screen from list void doPush( AsciiString layoutFile ); ///< workhorse for push action - void doPop( Bool impendingPush ); ///< workhorse for pop action + void doPop( Bool suppressInit ); ///< workhorse for pop action enum { MAX_SHELL_STACK = 16 }; ///< max simultaneous shell screens WindowLayout *m_screenStack[ MAX_SHELL_STACK ]; ///< the screen layout stack diff --git a/Core/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp b/Core/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp index 1b6278d02db..b9f1d1898b4 100644 --- a/Core/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp +++ b/Core/GameEngine/Source/GameClient/GUI/Shell/Shell.cpp @@ -93,7 +93,8 @@ void Shell::deconstruct() WindowLayout *newTop = top(); while(newTop) { - popImmediate(); + // TheSuperHackers @bugfix CryoTheRenegade 10/08/2026 Do not initialize uncovered screens while the shell is being destroyed. + popImmediate( TRUE ); newTop = top(); } @@ -424,7 +425,7 @@ void Shell::pop() * from the shutdown() for the screen, it will be immediately popped off * the stack */ //------------------------------------------------------------------------------------------------- -void Shell::popImmediate() +void Shell::popImmediate( Bool suppressInit ) { WindowLayout *screen = top(); @@ -448,7 +449,7 @@ void Shell::popImmediate() screen->runShutdown( &immediatePop ); // pop the screen of the stack - doPop( FALSE ); + doPop( suppressInit ); if (TheIMEManager) TheIMEManager->detach(); @@ -685,7 +686,7 @@ void Shell::doPush( AsciiString layoutFile ) //------------------------------------------------------------------------------------------------- /** Actually do the work for a pop */ //------------------------------------------------------------------------------------------------- -void Shell::doPop( Bool impendingPush ) +void Shell::doPop( Bool suppressInit ) { WindowLayout *currentTop = top(); @@ -706,7 +707,7 @@ void Shell::doPop( Bool impendingPush ) // run the init for the new top of the stack if present WindowLayout *newTop = top(); - if( newTop && !impendingPush ) + if( newTop && !suppressInit ) { newTop->runInit( nullptr ); //newTop->bringForward();