diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp index 8f94cb04af..96f8ca46ba 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp @@ -755,7 +755,9 @@ void StealthUpdate::changeVisualDisguise() const ThingTemplate *tTemplate = self->getTemplate(); - TheThingFactory->newDrawable( tTemplate ); + // TheSuperHackers @fix helmutbuhler 13/04/2025 Fixes missing pointer assignment for the new drawable. + // This originally caused no runtime crash because the new drawable is allocated at the same address as the previously deleted drawable via the MemoryPoolBlob. + draw = TheThingFactory->newDrawable( tTemplate ); if( draw ) { TheGameLogic->bindObjectAndDrawable(self, draw); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp index 260f86224c..1aac39716d 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/StealthUpdate.cpp @@ -1055,7 +1055,9 @@ void StealthUpdate::changeVisualDisguise() const ThingTemplate *tTemplate = self->getTemplate(); - TheThingFactory->newDrawable( tTemplate ); + // TheSuperHackers @fix helmutbuhler 13/04/2025 Fixes missing pointer assignment for the new drawable. + // This originally caused no runtime crash because the new drawable is allocated at the same address as the previously deleted drawable via the MemoryPoolBlob. + draw = TheThingFactory->newDrawable( tTemplate ); if( draw ) { TheGameLogic->bindObjectAndDrawable(self, draw);