Skip to content

Commit 835d795

Browse files
committed
fix: dont' crash on this other function
1 parent 705a5c0 commit 835d795

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Assets/Scripts/Brain/ReferenceCoordBehavior.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ private void SetReferenceCoordinate(Vector3 refWorldU)
4949

5050
public void UpdateAxisDirections()
5151
{
52+
if (BrainAtlasManager.Instance == null || BrainAtlasManager.ActiveReferenceAtlas == null)
53+
return;
5254
Vector3 apDir = BrainAtlasManager.T2World_Vector(Vector3.right);
5355
Vector3 mlDir = BrainAtlasManager.T2World_Vector(Vector3.up);
5456
Vector3 dvDir = BrainAtlasManager.T2World_Vector(Vector3.forward);

0 commit comments

Comments
 (0)