Naya Rivera has given her two cents about the charges filed against her ex-boyfriend and “Glee” co-star Mark Salling and how she feels about their former relationship now.

In an interview with People, the actress said that while she was not “totally shocked” about the news, it still made her say “WTF.”

Rivera said that when her son’s nanny broke the news to her, she felt extremely relieved that she was no longer involved with him. The actress also said that she was devastated when Salling called it quits, but looking back at it now, she’s happy that it happened.

The “Devious Maids” star also wrote about her relationship with the actor in her memoir, “Sorry Not Sorry.” Rivera said everyone should have a bad relationship, just to have something that will help them learn valuable life lessons. The actress said it’s important to have those things to look back on without regrets.

She backtracked a bit, though, and clarified: “Unless, of course, that relationship was with someone who had a sizable stash of child porn on his computer. Then, by all means, regret everything.”

Rivera explained why she made the comment about Salling in an interview with Entertainment Tonight, saying she had always thought her ex had a “very dark soul.” The actress added that she always felt like Salling was struggling with something.

Rivera and Salling dated in 2010, although Salling said they were never officially together.

Salling was arrested for child pornography charges in December 2015 after someone tipped off the police about his extensive collection of child pornography, according to Us Weekly. He was released on bail. In the charges’ June arraignment, he pleaded not guilty. Salling is currently out on a $150,000 bond.

Meanwhile, Rivera is now married to Ryan Dorsey. They have a son together.

Naya Rivera Naya Rivera, pictured here at the 23rd Annual Race To Erase MS Gala, has opened up about her ex-boyfriend Mark Salling's child pornography charges. Photo: Getty Images/Angela Weiss