Fix NRE when disconnecting

This commit is contained in:
Paul Pacheco 2019-01-29 19:01:03 -06:00
parent 12d0eaac8e
commit 6c163d1a45

View File

@ -363,7 +363,7 @@ public static void DestroyAllClientObjects()
foreach (KeyValuePair<uint, NetworkIdentity> kvp in NetworkIdentity.spawned)
{
NetworkIdentity identity = kvp.Value;
if (identity.gameObject != null)
if (identity != null && identity.gameObject != null)
{
if (!InvokeUnSpawnHandler(identity.assetId, identity.gameObject))
{