Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ void MissileLauncherBuildingUpdate::switchToState(DoorStateType dst)
if (m_doorState == dst)
return;

// Safety check: if the object has been destroyed, don't attempt state changes
if (!getObject())
return;

const MissileLauncherBuildingUpdateModuleData* d = getMissileLauncherBuildingUpdateModuleData();
ModelConditionFlags clr, set;
UnsignedInt now = TheGameLogic->getFrame();
Expand Down Expand Up @@ -220,6 +224,10 @@ Bool MissileLauncherBuildingUpdate::isPowerCurrentlyInUse( const CommandButton *
//-------------------------------------------------------------------------------------------------
UpdateSleepTime MissileLauncherBuildingUpdate::update( void )
{
// Safety check: if the object has been destroyed, don't update
if (!getObject())
return UPDATE_SLEEP_NONE;

const MissileLauncherBuildingUpdateModuleData* d = getMissileLauncherBuildingUpdateModuleData();

UnsignedInt now = TheGameLogic->getFrame();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ void MissileLauncherBuildingUpdate::switchToState(DoorStateType dst)
if (m_doorState == dst)
return;

// Safety check: if the object has been destroyed, don't attempt state changes
if (!getObject())
return;

const MissileLauncherBuildingUpdateModuleData* d = getMissileLauncherBuildingUpdateModuleData();
ModelConditionFlags clr, set;
UnsignedInt now = TheGameLogic->getFrame();
Expand Down Expand Up @@ -236,6 +240,10 @@ Bool MissileLauncherBuildingUpdate::isPowerCurrentlyInUse( const CommandButton *
//-------------------------------------------------------------------------------------------------
UpdateSleepTime MissileLauncherBuildingUpdate::update( void )
{
// Safety check: if the object has been destroyed, don't update
if (!getObject())
return UPDATE_SLEEP_NONE;

const MissileLauncherBuildingUpdateModuleData* d = getMissileLauncherBuildingUpdateModuleData();

UnsignedInt now = TheGameLogic->getFrame();
Expand Down
Loading