Strange NullReferenceException

I have been working a my game for a while and everything has been working fine until today. My win script suddenly stopped working without any change from me. I’m really pulling my hair out on this one. The object goal is in the level and it is referenced in the script.

 // Win Condition
    if (Vector3.Distance(Body.transform.position, Goal.transform.position) < .5) {  
    // If the distance between Body and Goal is Less Than n, play the Goal sound and set the GoalFlag to true
    // adjust this number to match your Body and Goal sizes, and world scale
        if (WinFlag == false) {
            OverlayFlag = false; //We set this to false so that the Overlay and Win text don't collide. Change if needed.
            audio.clip = WinClip; // set our Audio Source to (cue) this clip
            audio.Play(); // command the audio source to Play
            HubScript.CFlag = true;

I just solved it. I had a curly brace above //Win Condition that closed off function update