limyaael @ 12:17 am:

Yes. In David Feintuch's
Prisoner's Hope. The protagonist sets off a nuclear weapon to save a planet, which is treason in his future society that hates all things nuclear, and goes home to await trial- only to receive word on the way that the Earth government has just passed a law saying that if a nuclear weapon is set off to save a planet, then it's not treason. Do not ask me why I read these books.