Skip to content

Commit 78b7961

Browse files
authored
[GEN][ZH] Fix dangling pointer in StealthUpdate::update() when GLA Bomb Truck changes disguise (#816)
1 parent 2713267 commit 78b7961

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ UpdateSleepTime StealthUpdate::update( void )
411411
{
412412
//Switch models at the halfway point
413413
changeVisualDisguise();
414+
415+
// TheSuperHackers @fix Skyaero 06/05/2025 obtain the new drawable
416+
draw = getObject()->getDrawable();
417+
414418
m_disguiseHalfpointReached = true;
415419
}
416420
//Opacity ranges from full to none at midpoint and full again at the end

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ UpdateSleepTime StealthUpdate::update( void )
672672
{
673673
//Switch models at the halfway point
674674
changeVisualDisguise();
675+
676+
// TheSuperHackers @fix Skyaero 06/05/2025 obtain the new drawable
677+
draw = getObject()->getDrawable();
678+
675679
m_disguiseHalfpointReached = true;
676680
}
677681
//Opacity ranges from full to none at midpoint and full again at the end

0 commit comments

Comments
 (0)