I've leaned a shotgun up against a tree to take a leak while hunting and had it tip over more times than I can count. I always empty the chamber if it's a double, and pull back the slide if it's a pump, but I still jump a little if the gun happens to fall in my direction!
I can remember two times with other guns. Once was my P938, I was on the pot (there seems to be a theme here) and was standing up and pulling up my pants when my arm hit the sink next to me and the SIG when sprawling from it's holster onto the tile floor. While I was sitting there contemplating what happened I noticed the safety was off which scared me enough that I haven't carried that gun since, as I'm positive the safety was on when I holstered the gun earlier that day. Did the safety flip off while in the holster, or did the fall somehow knock it loose? Both seem unlikely, so who knows.
The other time was just last week, I'd been out wade fishing all day with my LCP in my pocket. Got home and was dog tired but dissembled the lcp and ran everything under tap water to clean it, drenched it in wd40, wiped all the wd40 with solvent, re-oiled and reassembled, loaded it and took it upstairs to put in the bedside safe when I dropped it by the bed. I realized 2 things: I was too tired to be handling a loaded gun, and I was very thankful I had found a dry pocket holster to put in in before carrying it because my instinct was to catch the gun.
Nope, I just remembered another time I dropped a gun! I was 16 and had just gotten my 12ga 870 express. Before that the largest guns I'd fired was .22's and a 20ga at Scout camp taking the clay shooting merit bade. I had a pocket full of Remington sluggers to get ready for deer season. Spoiler, I didn't realize that slugs kicked more than birdshot. So I casually put the gun to my shoulder, pulled the trigger and dropped the gun in the mud from the painful sting in my shoulder!!!! At the time I just thought that was the difference between how a 20ga and 12ga kicked, so much so that I avoided shooting clays with a buddy and his family when he invited me later that fall. I had barely made it through 10 slugs to sight in the gun, I KNEW I'd never make it through the 50 or so rounds of 8 shot my buddy told me to bring!