Law enforcement sources tell TMZ ... the rapper got busted in Atlanta on Wednesday for selling weed, and possession of firearms. According to Richie's reps, the arrest went down in a recording studio ... which happens to be the same studio where Young Thug shot his "Halftime" music video.
As we've reported ... that music video is part of the indictment against the guy cops say shot up Wayne's bus.
Richie's peeps say the cops were investigating Thug, but instead found Richie with marijuana and 2 guns. Richie's camp claim the drugs and guns weren't his, but since he didn't want to snitch ... he "accepted responsibility."
Positive spin: Richie's an up and comer, and the Young Thug/Lil Wayne related arrest could give him street cred.
Reality: He has previous felonies, so he could be facing hard time in prison.
Funny case of wrong place, wrong time ... unless you're Richie.