Fixes to codegen to avoid nullptr access during disconnects
This commit is contained in:
@@ -1673,12 +1673,18 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
|
||||
void {{ ComponentBaseName }}::ActivateController(Multiplayer::EntityIsMigrating entityIsMigrating)
|
||||
{
|
||||
m_controller.get()->Activate(entityIsMigrating);
|
||||
if (m_controller)
|
||||
{
|
||||
m_controller->Activate(entityIsMigrating);
|
||||
}
|
||||
}
|
||||
|
||||
void {{ ComponentBaseName }}::DeactivateController(Multiplayer::EntityIsMigrating entityIsMigrating)
|
||||
{
|
||||
m_controller.get()->Deactivate(entityIsMigrating);
|
||||
if (m_controller)
|
||||
{
|
||||
m_controller->Deactivate(entityIsMigrating);
|
||||
}
|
||||
}
|
||||
|
||||
void {{ ComponentBaseName }}::NetworkAttach(Multiplayer::NetBindComponent* netBindComponent, Multiplayer::ReplicationRecord& currentEntityRecord, Multiplayer::ReplicationRecord& predictableEntityRecord)
|
||||
|
||||
Reference in New Issue
Block a user