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

Conversation

0xFA11
Copy link
Contributor

@0xFA11 0xFA11 commented Nov 19, 2021

Fixes #1378 — NullReferenceException while building a project

Author: @rafek
Original PR: #1410


In some cases, for example when assembly is System.Colletions.Immutable, null value is passed to .Add() method causing NullReferenceException
during the build. Simply guarding against it solves the issue.

Co-authored with @JadenH

PR Checklist

  • Have you added a backport label (if needed)? For example, the type:backport-release-* label. After you backport the PR, the label changes to stat:backported-release-*.
  • Have you updated the changelog? Each package has a CHANGELOG.md file.
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR or a link to the documenation repo PR if this is a manual update.

Changelog

com.unity.netcode.gameobjects

Testing and Documentation

  • N/A

rafek and others added 3 commits November 10, 2021 06:14
NetworkBehaviourILPP (#1378)

In some cases, for example when assembly is System.Colletions.Immutable, null value is passed to .Add() method causing NullReferenceException
during the build. Simply guarding against it solves the issue.

Co-authored with @JadenH
@0xFA11
Copy link
Contributor Author

0xFA11 commented Nov 19, 2021

@andrews-unity we might consider backporting this to 1.0 — what do you think?

@andrews-unity andrews-unity enabled auto-merge (squash) November 23, 2021 20:56
@andrews-unity andrews-unity merged commit 9250862 into develop Nov 23, 2021
@andrews-unity andrews-unity deleted the external-rafek branch November 23, 2021 21:37
andrews-unity added a commit that referenced this pull request Nov 24, 2021
…#1434)

* fix: NullReferenceException during ImportReferences in
NetworkBehaviourILPP (#1378)

In some cases, for example when assembly is System.Colletions.Immutable, null value is passed to .Add() method causing NullReferenceException
during the build. Simply guarding against it solves the issue.

Co-authored with @JadenH
Co-authored-by: rafek <rafal.legiedz@gmail.com>
andrews-unity added a commit that referenced this pull request Nov 24, 2021
…#1434) (#1454)

* fix: NullReferenceException during ImportReferences in
NetworkBehaviourILPP (#1378)

In some cases, for example when assembly is System.Colletions.Immutable, null value is passed to .Add() method causing NullReferenceException
during the build. Simply guarding against it solves the issue.

Co-authored with @JadenH
Co-authored-by: rafek <rafal.legiedz@gmail.com>
mollstam pushed a commit to Keepsake-Games/com.unity.netcode.gameobjects that referenced this pull request Feb 13, 2023
…Unity-Technologies#1434)

* fix: NullReferenceException during ImportReferences in
NetworkBehaviourILPP (Unity-Technologies#1378)

In some cases, for example when assembly is System.Colletions.Immutable, null value is passed to .Add() method causing NullReferenceException
during the build. Simply guarding against it solves the issue.

Co-authored with @JadenH

* update changelog

Co-authored-by: rafek <rafal.legiedz@gmail.com>
mollstam pushed a commit to Keepsake-Games/com.unity.netcode.gameobjects that referenced this pull request Feb 13, 2023
…Unity-Technologies#1434) (Unity-Technologies#1454)

* fix: NullReferenceException during ImportReferences in
NetworkBehaviourILPP (Unity-Technologies#1378)

In some cases, for example when assembly is System.Colletions.Immutable, null value is passed to .Add() method causing NullReferenceException
during the build. Simply guarding against it solves the issue.

Co-authored with @JadenH
Co-authored-by: rafek <rafal.legiedz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullReferenceException while building a project
3 participants