From 35364c94038cdbfec2de5a02bc04c77bfb415c4b Mon Sep 17 00:00:00 2001 From: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com> Date: Tue, 22 Jun 2021 23:13:23 -0400 Subject: [PATCH] Fixing a nullptr crash in NetworkTime --- Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.cpp b/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.cpp index f94a8c59d0..9a8a2c1bc1 100644 --- a/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkTime/NetworkTime.cpp @@ -128,9 +128,11 @@ namespace Multiplayer for (NetworkEntityHandle entityHandle : m_rewoundEntities) { - NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + if (NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent()) + { netBindComponent->NotifySyncRewindState(); } + } m_rewoundEntities.clear(); } }