File tree Expand file tree Collapse file tree
GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw
Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/Drawable/Draw Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1095,6 +1095,11 @@ void W3DModelDrawModuleData::validateStuffForTimeAndWeather(const Drawable* draw
10951095// -------------------------------------------------------------------------------------------------
10961096W3DModelDrawModuleData::~W3DModelDrawModuleData ()
10971097{
1098+ // Explicitly clear containers to ensure proper destruction order and prevent
1099+ // memory corruption during shutdown. Each ModelConditionInfo contains a
1100+ // PristineBoneInfoMap that must be destroyed properly before implicit cleanup.
1101+ m_conditionStates.clear ();
1102+ m_transitionMap.clear ();
10981103 m_conditionStateMap.clear ();
10991104}
11001105
Original file line number Diff line number Diff line change @@ -1117,6 +1117,11 @@ void W3DModelDrawModuleData::validateStuffForTimeAndWeather(const Drawable* draw
11171117// -------------------------------------------------------------------------------------------------
11181118W3DModelDrawModuleData::~W3DModelDrawModuleData ()
11191119{
1120+ // Explicitly clear containers to ensure proper destruction order and prevent
1121+ // memory corruption during shutdown. Each ModelConditionInfo contains a
1122+ // PristineBoneInfoMap that must be destroyed properly before implicit cleanup.
1123+ m_conditionStates.clear ();
1124+ m_transitionMap.clear ();
11201125 m_conditionStateMap.clear ();
11211126}
11221127
You can’t perform that action at this time.
0 commit comments