Taxpayers would no longer have to pay the legal tab for state lawmakers who beat criminal charges under a bill being revived amid the resignation of ex-Attorney General Eric Schneiderman.

State Sen. Mike Gianaris (D-Queens) is pushing the legislation while considering a run for the post Schneiderman quit last Monday, hours after allegations he assaulted three ex-girlfriends and a fourth woman who turned down his advances were published online by the New Yorker.

Under state law, politicians are allowed to use campaign funds to defend themselves against charges tied to their official posts, and taxpayers have to reimburse them if they beat the rap.

Gianaris initially drafted legislation to eliminate the taxpayer provision in 2015, following the acquittal of former Senate Majority Leader Joseph Bruno (R-Rensselaer) after his retrial on corruption charges.

Bruno received $1.8 million in public money, and promptly donated more than $1 million to Republican Senate candidates — infuriating Gianaris, who chairs the Senate Democratic Campaign Committee.

“That was one of the most egregious examples of a waste of taxpayer money,” Gianaris said.

“Preventing such reimbursements would result in substantial savings to the state.”

Gianaris’ bill has languished since his first introduced it, and there was no immediate action when he asked for a vote by the Senate Investigations and Government Operations Committee.

But in the wake of the allegations against Schneiderman, a vote could come as early as this week.

Asked if there was any connection, Gianaris said only: “The abuse of the campaign-finance law has been bipartisan throughout history.”

Schneiderman, who has admitted “role-playing” but denied assaulting anyone, has $8.5 million in his campaign account, but it’s unclear if he can use that money to defense himself against potential criminal charges.

In a letter last week, Gov. Cuomo’s counsel, Alphonso David, wrote that the special prosecutor in the case, Nassau District Attorney Madeline Singas, “shall investigate facts in the article suggesting that the Attorney General staff and office resources may have been used to facilitate alleged abusive liaisons.”

Schneiderman also has a personal fortune of between $3.1 million and $5.1 million, according to his most recent financial-disclosure filing.

His lawyer Isabelle Kirshner on Sunday declined to say how Schneiderman was paying her fees, saying: “I’m not going to discuss where his resources are coming from.”