Star Wars Episode 6: Return of the Jedi - R2 Was Blasted
In one scene R2 D2 comes to help open the shield door during the Battle of Endor. He is hit by a laser blast that sends him flying and looks like it basically fries him. A few scenes later when the battle is over he is happily tooting as if nothing ever happened.
Bear in mind that a lot of personnel were dropped to the surface of Endor after the battle to pick up the commandos and tend to wounded etc. (Apparently the entire compliment of fighter pilots who survived joined the festivities as well) They probably would've sent a team who could repair droids too. I think Mr Lucas expected you to come to that conclusion. Besides it wouldn't be very nice for R2 to still be fried at the end of the film. Not exactly a feel good ending...