Skip to content

Commit

Permalink
fix: NullReferenceError when there are missing components
Browse files Browse the repository at this point in the history
Closes: #519
  • Loading branch information
bdunderscore committed Jan 25, 2025
1 parent e0dc5ec commit 0dde6f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Fixed
- NullReferenceErrors when there are missing components, breaking scene view movement (#520)

### Changed

Expand Down
2 changes: 1 addition & 1 deletion Editor/ChangeStream/ShadowGameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ internal int[] CurrentComponentStructure

for (var i = 0; i < comps.Length; i++)
{
instanceIds[i] = comps[i].GetInstanceID();
instanceIds[i] = comps[i]?.GetInstanceID() ?? 0;
}

return instanceIds;
Expand Down

0 comments on commit 0dde6f2

Please sign in to comment.