Mark Salling arrives at the 32nd annual Paleyfest "Glee" in Los Angeles. Salling, one of the stars of the Fox musical comedy “Glee,” died, Tuesday Jan. 30, 2018. He was 35. Picture: AP

Mark Salling's child pornography charges are to be dropped following the 'Glee' star's suicide, meaning the agreement he made in court to compensate victims has been rendered void.

The 'Glee' actor was awaiting sentencing after pleading guilty to possession of child pornography when he took his own life at the age of 35 last month.

READ: Mark Salling's death officially ruled suicide

As well as facing four to seven years in jail, Salling had agreed to register as a sex offender, spend 20 years under supervised release, and pay $50,000 to each victim who submitted a formal restitution request.

But following Salling's death federal prosecutors plan to drop the charges, voiding any compensation agreement.

Former prosecutor Mann Medrano told Buzzfeed: "If that person dies accidentally or by suicide, the government can no longer proceed. Essentially, no defendant, no criminal prosecution."

Any compensation agreement is unenforceable until it has been approved by a judge, which had not yet happened in Salling's case as he was yet to be sentenced.

The victims could still try to seek damages from Salling's estate, which is reportedly worth close to $2 million. But they would have to prove their case in a civil court.

The late actor's lawyer refused to comment on whether any of the victims have already notified him of their intention to pursue civil action.

Salling - famous for playing bad boy Puck in hit musical TV show 'Glee' - pleaded guilty in October last year to using software to mask his IP address and downloading thousands of graphic images of children. He was due to be sentenced six weeks after he committed suicide by hanging.

A family source previously revealed he had attempted to take his own life in August, and that he had later told the judge at his trial he was taking medication for depression after the incident.

The family released a statement following his death which read: "I can confirm that Mark Salling passed away early this morning. Mark was a gentle and loving person, a person of great creativity, who was doing his best to atone for some serious mistakes and errors of judgment. He is survived by his mother and father, and his brother. The Salling family appreciates the support they have been receiving and asks for their privacy to be respected."