Skip to content

Commit 2fc16fd

Browse files
Merge pull request #128 from github-harunadev/patch-1
small failsafe for Decode()
2 parents eb00f73 + 382b46d commit 2fc16fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Runtime/Player/PlayerPersistence/ClientSimPlayerObjectStorage.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ private void Decode()
148148
ClientSimPlayer player = _player.GetClientSimPlayer();
149149
foreach (GameObject persistantObject in player.PlayerPersistenceObjects)
150150
{
151+
if (!persistantObject) continue;
151152
IClientSimNetworkId networkId = persistantObject.GetComponent<IClientSimNetworkId>();
152153
if (networkId == null) continue;
153154
int id = networkId.GetNetworkId();
@@ -177,4 +178,4 @@ public void LateUpdate()
177178
}
178179
#endif
179180
}
180-
}
181+
}

0 commit comments

Comments
 (0)