mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Fix NRE when disconnecting
This commit is contained in:
parent
12d0eaac8e
commit
6c163d1a45
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user