Singer Chris Brown was in court after failing a drugs test on Monday.
The controversial singer tested positive for drug use and will face a probation violation hearing on November 1.
Chris was sentenced to a five-year probation period in 2009, after he physically assaulted then-girlfriend Rihanna.
However, the Umbrella singer was quick to jump to Chris' defence and post support for the musician on Twitter.
She tweeted: "@chrisbrown, I'm praying for you and wishing you the best today!"
Another tweet sent on Monday does not mention Chris' name, but it does suggest that Rihanna is offering support for a friend in need.
She said: "Praying for you baby, my best wishes are with you today! Remember that whatever God does in our lives, it is WELL DONE!!!"
The pair's relationship has been in the headlines again after Rihanna appeared on The Oprah Winfrey Show in August and declared that Chris was "the love of her life".
Then, the Bajan songstress also gave the bad boy R'n'B star a kiss on the cheek when she congratulated on him his award at the VMAs this month.
Judge Schnegg was shown evidence that the singer has a medical license for marijuana usage in the state of California.
Nevertheless, she warned him about the impact of his conduct on fans. "You are not only in the public eye, but you're on probation. So you're not an ordinary person who just sits there and does what they want," she said.