A man who died on the way to court to face charges of possessing indecent images of children would have been found not guilty.
Nicholas Stout, 57, had been accused of making indecent images of children but collapsed minutes before entering a not guilty plea.
He was found slumped in the street and later died in hospital and the case at Plymouth Crown Court was abandoned.
His family have been trying to clear his name and a judge has now ruled the prosecution case would have been unsuccessful.
Judge Cotter awarded the family more than £7,000 in costs at a hearing at the same court.
He said: “In my view if the trial had gone ahead, the overwhelming likelihood is that he would not have been convicted.
”He would have left this court without a stain on his character.”
It has not been revealed what caused Mr Stout to collapse and die in September but his family said the accusations had placed him under pressure and stress.
Defending, Ali Rafati, said there was no evidence that 128 illegal images found on Mr Stout’s computer hard drive had actually been viewed.
He said they may have been stored because they were on the same web page as legal images – possibly as thumbnail pictures off screen.
A police source said data, including indecent images of children and links to such websites, can be embedded on legal web pages.
This data then is downloaded by personal computers visiting these sites, placing the information, images and links onto the temporary web cache.
The viewer may not be actively seeking such images but the computer will record the data.
No incriminating search engine terms had been found on the computer, the court heard.
Mr Stout’s widow, Caroline, was in court to hear Judge Cotter’s ruling.
Afterwards she said: “I knew my husband was innocent from the start and this ordeal obviously caused us all stress, myself and my husband and my family.
“He had the support of all of us; we knew he was innocent. It is just a shame he was not here to hear the outcome.”
Stout had denied seven counts of making indecent images of children between November 2006 and June 2010.
A spokesperson for the Crown prosecution Service said: “Under UK law, everyone is presumed innocent until proved guilty and Mr Stout has not been found guilty of this offence. We wish to express our sympathy for Mr Stout’s family.”