diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp index 6ec1187911..8276882923 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -430,7 +430,11 @@ Object::Object( const ThingTemplate *tt, const ObjectStatusMaskType &objectStatu m_soleHealingBenefactorID = INVALID_ID; ///< who is the only other object that can give me this non-stacking heal benefit? m_soleHealingBenefactorExpirationFrame = 0; ///< on what frame can I accept healing (thus to switch) from a new benefactor + // TheSuperHackers @bugfix Mauller/xezon 02/08/2025 sendObjectCreated needs calling before CreateModule's are initialized to prevent drawable related crashes + // This predominantly occurs with the veterancy create module when the chemical suits upgrade is unlocked as it tries to set the terrain decal. + // emit message announcing object's creation + TheGameLogic->sendObjectCreated( this ); } // end Object @@ -455,9 +459,6 @@ void Object::initObject() // If I have a valid team assigned, I can run through my Upgrade modules with his flags updateUpgradeModules(); - // emit message announcing object's creation - TheGameLogic->sendObjectCreated( this ); - //If the player has battle plans (America Strategy Center), then apply those bonuses //to this object if applicable. Internally it validates certain kinds of objects. const Player* controller = getControllingPlayer(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp index 370851e84a..13fbed2705 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp @@ -499,7 +499,11 @@ Object::Object( const ThingTemplate *tt, const ObjectStatusMaskType &objectStatu m_soleHealingBenefactorID = INVALID_ID; ///< who is the only other object that can give me this non-stacking heal benefit? m_soleHealingBenefactorExpirationFrame = 0; ///< on what frame can I accept healing (thus to switch) from a new benefactor + // TheSuperHackers @bugfix Mauller/xezon 02/08/2025 sendObjectCreated needs calling before CreateModule's are initialized to prevent drawable related crashes + // This predominantly occurs with the veterancy create module when the chemical suits upgrade is unlocked as it tries to set the terrain decal. + // emit message announcing object's creation + TheGameLogic->sendObjectCreated( this ); } // end Object @@ -524,9 +528,6 @@ void Object::initObject() for (int i = 0; i < WEAPONSLOT_COUNT; ++i) m_lastWeaponCondition[i] = WSF_INVALID; - // emit message announcing object's creation - TheGameLogic->sendObjectCreated( this ); - // If I have a valid team assigned, I can run through my Upgrade modules with his flags updateUpgradeModules();