Skip to content

Commit

Permalink
fix: another source of NRE in CurrentComponentStructure (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdunderscore authored Jan 26, 2025
1 parent e575f81 commit 705cb7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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
- Fixed another source of NullReferenceErrors after deleting game objects (#522)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions Editor/ChangeStream/ShadowGameObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@ internal int[] CurrentComponentStructure
{
get
{
if (GameObject == null) return Array.Empty<int>();

var comps = GameObject.GetComponents<Component>();
var instanceIds = new int[comps.Length];

Expand Down

0 comments on commit 705cb7b

Please sign in to comment.