The Dukes of Hazzard
Enos and Daisy's Wedding (7x16)
:
A pair of crooks robs Boss' bank and frame Enos for it; Daisy becomes a witness against him when she thinks she saw it. Daisy, knowing that Enos would never do it, cannot refuse to testify against him or she'll be in contempt. So she decides to marry Enos - that way she cannot legally testify against him.