It pays to have a big-time lawyer on your side!

Rob Kardashian is currently dealing with the legal aftermath of his social media revenge porn attack on ex-fiancée Blac Chyna — where he repeatedly uploaded nude photos of the mother of his child in a revenge porn spree on Wednesday, July 5 — but he’s in good hands now that he’s lawyered up with an old family friend, Robert Shapiro.

Shapiro showed up in court on Monday, July 10 on Rob’s behalf after Chyna hired famed attorney Lisa Bloom to defend in her legal battle against her ex. During the hearing, Shapiro did not contest the slew of temporary restraining orders that Chyna asked for.

robert shapiro rob kardashian getty

Robert Shapiro held a press conference before the court hearing. (Photo Credit: Getty Images)

MORE: Rob Kardashian Allegedly Threatened to Kill Himself Multiple Times After His Split From Blac Chyna

A judge granted a set of restraining orders that will protect Chy, ensuring that Rob will not be able to come near her, and he will not be allowed to post photos, videos, or any personal information about her online, TMZ reported, but their legal issues are far from over, as they’ll be focusing on a custody arrangement for their eight-month-old daughter Dream.

The celebrity lawyer has worked closely with the Kardashian family through their various legal woes. Keep reading below to find out more about him!

He was very close friends with Robert Kardashian Sr.

The pals worked closely together on what was dubbed the legal “dream team” that represented former NFL star O.J. Simpson in the 1995 murder trial for his ex-wife, Nicole Brown Simpson and her friend Ron Goldman. Their teamwork eventually led to O.J.’s acquittal on all charges, and Shapiro has kept in close contact with the Kardashian/Jenner family ever since.

robert shapiro o.j. simpson trial getty

Robert Shapiro on the defense team during the 1995 O.J. Simpson trial. (Photo Credit: Getty Images)

MORE: Could Kris Jenner Get Custody of Baby Dream? Expert Family Attorney Weighs In

This isn’t the first time he’s defended Rob.

Back in 2013, Rob was charged with battery and theft after he allegedly assaulted a female photographer who took photos of him leaving a gym shirtless, according to TMZ. Shapiro defended Rob in the cast, and the charges were later dropped.

He apologized to Chyna on Rob’s behalf.

In a press conference after the July 10 court hearing, Shapiro made it clear that his client would like to put his social media meltdown behind him and start working on his co-parenting relationship with Chyna for the sake of their baby girl.

“I personally, on Mr. Kardashian’s behalf, apologized and offered our regrets for what has taken place in the past couple of days,” Shapiro said in video footage obtained by TMZ. “Now we move forward to do one — and one thing only — whatever is in the best interest of this child.”

For access to all our exclusive celebrity videos and interviews – Subscribe on YouTube!