Play video content EXCLUSIVE TMZ.com

Well, this is random.

Turns out, when former "To Catch a Predator" host Chris Hansen came up with the money needed to get charges against him dropped for writing bad checks, he got a huge assist from a guy he never met ... with a troubling background.

Bob Romanik -- radio DJ for the St. Louis area station 1190 KQQZ-AM, best known for calling Waka Flocka the n-word -- tells TMZ ... he reached out to Hansen when he heard about his financial troubles and offered to help him out.

Romanik says he thinks Chris is a good guy who's done good work, so he gave him nearly $13,000 to square up with a mom-and-pop shop in Stamford, CT. We broke the story ... the cash got Hansen out of a jam with prosecutors, who decided to drop his larceny case.

Romanik isn't looking for Hansen to return him any favors either, but he does tell us if Chris starts another project busting predators and helping children ... he'd like to invest in the noble cause.

What's not noble ... is Romanik's history of dropping racial slurs on the air. As we told you, he went on a racist rant back in 2017 after Waka Flocka wiped his ass with a Trump jersey. Bob called the rapper a "greasy black n***** son of a bitch" -- and he hasn't stopped using the n-word since.

Play video content 2/14/17 TMZ.com

In fact, Romanik has responded to criticism for his racist comments by saying it's his First Amendment right ... and he'll stop saying the n-word when rappers stop saying it.

Missouri State Senator Jamilah Nasheed called for the FCC to remove Romanik's license last year for his hate speech, but as far as we know ... he's still on the air.