It has happened twice where I live, MadMick probably has a better memory of both events since he lived around here at the time (I assume). The first instance occurred when a local officer brought in a revolver for one of the dispatchers to buy, but the guy wanted to wait a bit, so the cop took it into the cruiser with him, placing it under his seat. This normally wouldn't have been a problem, but at the time their vehicles did not have a kick plate separating the back and front seats. After receiving a drunk and disorderly call he ended up collaring two illegals, and headed off to nearest substation.
This is where it gets weird, one of the men, whose name I forget, slips his hands to the front. Reaching down, while the officer is driving, he finds a bag under the officer's seat, containing the handgun. The dispatcher had wanted to fire it earlier in the day, and the cop did not clear out the cylinder before packing it up, so it was loaded. He took a bullet to the back of the dome, and a county wide search, of over 100 officers, hunted the two guys down.
The second time this occurred was odd as well. A local officer arrived on scene after the two suspects were caught, and was asked to bring them back to the station for processing. He was having marital problems at the time, things were not going well, and since the other officers had already searched them he decided he didn't need too, which was a mistake.
While driving to the station, distracted by the fact his life was falling apart, he didn't notice one of the suspects digging around in his back brace, which he pulled a gun from. I'm unsure whether he had to slip his hands back to the front or not, since the brace would lead some to cite cruel and unusual punishment due to his medical condition, but he shot the officer from behind, the car crashed, and all hell broke loose. The cop was fine, the two suspects got away, with the associate of the shooter turning himself in after grabbing some fried chicken (not joking).
The shooter was found later that night by an officer (I've met both these guys I'm talking about, cop wise), who came over to question him. They get into a shootout and the felon (I forgot to mention he was a felon with an illegally acquired weapon) took 5 or 6 bullets to the face, and ended up surviving, much to the despair of the county, who had to pay his medical bills. Rather than puncturing through his skull, and tearing through his brain, most of the bullets followed the curvature of the blasted thing. Dude is still alive and in jail, last I heard.