Thailand's Constitutional Court has dismissed a second case of electoral misconduct against the governing Democrat party.
The party was accused of failing to declare a political donation.
But, following the pattern of a ruling in a separate case last week, the judges found fault in the way the case was prepared.
A guilty verdict could have led to the party being dissolved and the prime minister banned from politics.
The court's decision may prove to be politically controversial.
The constitutional court has now thrown out two cases against the Democrat party in the space of two weeks.
In the first, the party was accused of misusing election funds.
This time the Democrats were charged with failing to declare a political donation from a giant cement company.
In each case the judges ruled that the prosecution had failed to follow proper legal procedures.
So the Democrats are off the hook. But the party has not been absolved of wrongdoing.
The court, by majority rather than unanimous decisions, dismissed the cases on legal technicalities.
That probably won't worry the governing party too much.
But it is likely to raise questions about the competence of the Election Commission which brought the cases.
The opposition will, once again, probably focus its scrutiny on the impartiality of Thailand's judicial system.
The court's decisions come at the end of a politically turbulent year for Thailand.
The country is still grappling with the bitter aftermath of anti-government protests, which left more than 90 people dead.