Pao’s lawsuit dodged a bullet when the judge ruled that nobody could mention to the jury how broke ex-hedgie Buddy is, at least on paper, because all that pension money firefighters gave him to manage seems to have vanished.

SAN FRANCISCO — The judge in Ellen Pao’s $16 million gender discrimination lawsuit against venture capital firm Kleiner Perkins has ruled that her financial situation isn’t relevant to the case and that bringing it into court would “create an unseemly sideshow.”

Kleiner’s lawyer, Lynne Hermle, had tried to get Judge Harold Kahn to overturn his pretrial ruling and allow Pao’s financial difficulties to be discussed in court.

That would presumably have included the financial troubles of Pao’s husband, Alphonse “Buddy” Fletcher Jr.

A hedge fund run by Fletcher has filed for bankruptcy, and he has been accused of fraud. According to Kleiner’s brief, tax liens on the sale of the couple’s condominium in San Francisco have been served on Pao’s Kleiner partnership interests.

However, Kahn quashed the idea in a ruling posted to the San Francisco Superior Court website Thursday.

Kahn said that Pao’s motivations weren’t relevant and that any relevance was outweighed by “the substantial danger of undue prejudice to Ms. Pao and confusion of issues, as well as undue consumption of time.”

In addition, Kahn said that the information about Pao and her husband’s financial situation was “protected by Ms. Pao’s and Mr. Fletcher’s rights of privacy.”

He cited a Tennessee ruling that found that anyone who “stands to gain financially has a motive to sue, whether or not they are in financial distress.”

That takes one potentially explosive issue off the table: whether Pao is suing the venture capital firm for gender discrimination to make a point — or to raise cash.

On the stand, Pao has said she wants $16 million from the Silicon Valley firm because it would take an eight-figure number to “hit their radar” and cause the firm to make changes in how women are treated.

Kleiner tried to make the argument before trial started that she’s doing it because her family needs the money.