It should have been in a pocket holster with the trigger covered.
Always keep the gun pointed in a safe direction
Always keep your finger off the trigger until ready to shoot
Always keep the gun unloaded until ready to use
All good. And may I add... "All guns are loaded."
Sure, some aren't. But the one you're messing with -- always assume it's loaded.