Skip to content

fix: (external) avoid NullReferenceException on ImportReferences call #1434

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
- Fixed a runtime error when sending an array of an INetworkSerializable type that's implemented as a struct (#1402)
- NetworkConfig will no longer throw an OverflowException in GetConfig() when ForceSamePrefabs is enabled and the number of prefabs causes the config blob size to exceed 1300 bytes. (#1385)
- Fixed NetworkVariable not calling NetworkSerialize on INetworkSerializable types (#1383)
- Fixed NullReferenceException on ImportReferences call in NetworkBehaviourILPP (#1434)

- Fixed NetworkObjects not being despawned before they are destroyed during shutdown for client, host, and server instances. (#1390)
- Fixed client player object being destroyed on server when the client's player object has DontDestroyWithOwner set. (#1433)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,11 @@ private bool ImportReferences(ModuleDefinition moduleDefinition)
assemblies.Add(m_MainModule.Assembly);
foreach (var reference in m_MainModule.AssemblyReferences)
{
assemblies.Add(m_AssemblyResolver.Resolve(reference));
var assembly = m_AssemblyResolver.Resolve(reference);
if (assembly != null)
{
assemblies.Add(assembly);
}
}

var extensionConstructor =
Expand Down