Sandra Bullock’s stalker called himself her husband, gets straight probation!

A man who stalked Sandra Bullock and broke into her home while she was there in 2014 pleaded no contest to felony stalking and burglary charges and was sentenced to continued mental health treatment and probation, reports the New York Post.

Joshua James Corbett entered the plea Wednesday. He was ordered to stay away from the Oscar-winning actress and not attempt to contact her for 10 years.

While in custody, Corbett received mental health treatment, and his lawyers requested an agreement that allowed their client to continue receiving the treatment.

In June 2014, Corbett, 41, was arrested in Bullock’s home. He had hopped the fence and rang the doorbell multiple times, then entered through a sunroom door. Bullock was in her bedroom and saw the man walk by, so she locked herself in her closet and called police.

The 15-minute phone call with 911 led a judge to order Corbett to stand trial. Bullock herself never testified during the hearings.

When police took Corbett into custody, he reportedly had 25 pages of writings about his obsession with the actress. He also called himself her husband.

He wasn’t armed at the time, but authorities later found a stock of illegal weapons in Corbett’s home. Corbett was charged with possessing a machine gun, two counts of possessing an assault weapon and 10 counts of possessing a destructive device.

Corbett could have been sentenced to up to 12 years in prison for the charges, but in February, a California appellate court ruled that Los Angeles police detectives had violated Corbett’s rights when they obtained authorization to search his home for guns.

During a hearing, Corbett said that he gave police his gun safe combination because he felt bad about what he had done. His lawyers proposed that Corbett was going through an opiate withdrawal when he consented to police searching his home for the weapons.

Photo: Associated Press