If a judgment against the defendant is reversed without ordering a new trial, the appellate court shall: (1) if the defendant is in custody, direct the defendant to be discharged from custody; (2) if the defendant is on bail, direct that the defendant's bail be exonerated; or (3) if money was deposited instead of bail, direct that it be refunded to the defendant.