Proving the innocence of a man accused of masturbating in public seems an unlikely win, but San Francisco Deputy Public Defender Tenette Smith can now put that on her resume.

A literal spat across from Walgreens in October led to Eugene Childs — a 59-year-old disabled veteran in a wheelchair — facing registration as a sex offender for indecent exposure and committing a lewd act in public, the public defender’s office says Tuesday.

Turns out he was handling stolen candy, not his genitals.

Within less than two hours on Friday, a jury determined that he was simply taking out multiple bags of candy that he shoplifted from the Walgreens on Castro Street.

A cellphone video showed Childs attempting to pull up his baggy pants, hold his stolen candy and get back into his wheelchair. During the struggle, his pants slipped down and briefly exposed his rear, public defender’s office spokesperson Tamara Aparton says.

One of two employees testified that she watched Childs masturbate as candy fell out of his pants, appearing to do so as revenge for being forced to leave. She later answered that, no, she could not tell if his penis was erect after seeing it for just one second.

The other witness said that she never saw Childs’s penis and that his movements were consistent with fishing candy out of pants, as one does.

Adding another development to a captivating dinner party story for the employees, Childs spat as he left, which hit the two women. Childs testified that he needed to spit and didn’t mean for the women to be caught in the crosshairs.

Childs was not charged with theft of candy but was ultimately convicted of misdemeanor battery for the spittle.