Former Shameless and EastEnders actor Jody Latham has burst into tears as he was spared a jail sentence for growing cannabis behind the partitioned wall of a garage.
Latham, 29, who recently dated the X Factor judge Tulisa Contostavlos, started crying in the dock as he was told by a judge that his "sophisticated" production of the drug could only warrant a prison term.
His tears of anguish turned to relief though when he learned the 12-month sentence would be suspended for two years.
He pleaded guilty at an earlier hearing at Burnley Crown Court to production of cannabis between March and May last year.
Police seized 24 plants at a former girlfriend's home in Stacksteads, Lancashire, as tests later showed 16 of the plants had matured and were capable of being sold for up to £9,000.
Habitual cannabis user Latham told the court he grew the plants because he was worried that buying from dealers would attract attention with his celebrity status.
Judge Beverley Lunt told him the simple solution was not to buy cannabis in the first place.
She warned him he would be brought before her if he committed another offence and he would then lose his liberty.
"I hope this will you deter you from offending and make you give up this drug," she said.
Latham, who found fame when he played Philip "Lip" Gallagher in Channel 4's Shameless and later as pimp Rob Grayson in the BBC One soap EastEnders, has a number of previous convictions, including two cautions for offences involving cannabis.