Naya Rivera always thought there was something more going on with Mark Salling.

The 29-year-old actress -- who writes in her new memoir, Sorry Not Sorry, that she wasn't "totally shocked" by her Glee co-star and ex-boyfriend's 2015 child pornography arrest -- recently revealed to ET why the charges did not come as a big surprise.

"He was always just a very dark soul to me," Rivera explained. "I always felt like there was something that he was wrestling with."

Rivera added that her dating Salling had a lot to do with being "young, dumb, and naive."

"You make such poor decisions in who you are going to date when you are 21, 22," she said. "Especially when you haven't dated that much ... You pick the hot guy, with the abs, who is kind of a bad boy."

As Rivera writes in her book, she and Salling dated on-and-off for three years while the two were on Glee together. Rivera claims she was dumped in 2010 following advice from Salling's publicist that being single would help his image.

"When Mark dumped me, I thought it was the worst thing ever," Rivera writes in her memoir. "Everyone should have that one relationship where you look back and ask yourself, 'What the hell was I thinking?'"

In June, Salling pleaded not guilty during his arraignment on two child pornography charges. He was released on a $150,000 bond and required to wear an ankle bracelet for monitoring, as well as being ordered to stay 100 feet away from schools, playgrounds and arcades, and avoid any contact with the internet, drugs or children.