diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp index 1902010dda7..114d0bbc59c 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp @@ -110,7 +110,7 @@ SpecialPowerModule::SpecialPowerModule( Thing *thing, const ModuleData *moduleDa { //A sharedNSync special only startPowerRecharges when first scienced or when executed, //Since a new modue with same SPTemplates may construct at any time. - if ( getSpecialPowerTemplate()->isSharedNSync() == FALSE ) + if ( getSpecialPowerTemplate() != nullptr && getSpecialPowerTemplate()->isSharedNSync() == FALSE ) startPowerRecharge(); } // WE USED TO DO THE POLL-EVERYBODY-AND-VOTE-ON-WHO-TO-SYNC-TO THING HERE, @@ -128,6 +128,7 @@ SpecialPowerModule::SpecialPowerModule( Thing *thing, const ModuleData *moduleDa // lets make sure TheIngameUI knows about our public timer // add this weapon to the UI if it has a public timer for all to see if( m_pausedCount == 0 && + getSpecialPowerTemplate() != nullptr && getSpecialPowerTemplate()->isSharedNSync() == TRUE && getSpecialPowerTemplate()->hasPublicTimer() == TRUE && getObject()->getControllingPlayer() && diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp index 55fc55da9cb..f57bf5e03d6 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/SpecialPower/SpecialPowerModule.cpp @@ -113,7 +113,7 @@ SpecialPowerModule::SpecialPowerModule( Thing *thing, const ModuleData *moduleDa { //A sharedNSync special only startPowerRecharges when first scienced or when executed, //Since a new module with same SPTemplates may construct at any time. - if ( getSpecialPowerTemplate()->isSharedNSync() == FALSE ) + if ( getSpecialPowerTemplate() != nullptr && getSpecialPowerTemplate()->isSharedNSync() == FALSE ) startPowerRecharge(); } // WE USED TO DO THE POLL-EVERYBODY-AND-VOTE-ON-WHO-TO-SYNC-TO THING HERE, @@ -131,6 +131,7 @@ SpecialPowerModule::SpecialPowerModule( Thing *thing, const ModuleData *moduleDa // lets make sure TheIngameUI knows about our public timer // add this weapon to the UI if it has a public timer for all to see if( m_pausedCount == 0 && + getSpecialPowerTemplate() != nullptr && getSpecialPowerTemplate()->isSharedNSync() == TRUE && getSpecialPowerTemplate()->hasPublicTimer() == TRUE && getObject()->getControllingPlayer() &&