Skip to content

Commit

Permalink
fix: Possible null reference exception when setting transform position
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagomvas committed Jun 10, 2024
1 parent be6bcf9 commit 35f7d32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Basalt/Common/Components/Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public Vector3 Position
return;
}

Engine.Instance.EntityManager.ChunkingMechanism.MarkForUpdate(Entity);
if(Engine.Instance.EntityManager != null)
Engine.Instance.EntityManager.ChunkingMechanism.MarkForUpdate(Entity);


var offset = value - position;
Expand Down

0 comments on commit 35f7d32

Please sign in to comment.