Skip to content

Commit

Permalink
add missing null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
glabute committed Aug 6, 2024
1 parent 4da6502 commit a8ae79b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public override void MutateCameraState(ref CameraState state, float deltaTime)
/// <returns></returns>
internal bool GetGetSplineAndDolly(out SplineContainer spline, out CinemachineSplineDolly dolly)
{
if (TryGetComponent(out dolly))
dolly = null;
if (this != null && TryGetComponent(out dolly))
{
spline = dolly.Spline;
return spline != null && spline.Spline != null;
Expand Down

0 comments on commit a8ae79b

Please sign in to comment.