That is a good reminder and I am glad you are OK. Sounds like you did not engage the manual safety, and left the hammer directly over the firing pin....so that when your gun fell off its hook or whatever and landed on the hammer, your gun discharged. That is a safety issue inherent in the single action design, I reckon.
The thing to keep in mind here is that it is not only important to keep an empty under the hammer - or the safety engaged, if you choose to rely on the safety - but it is also of critical important when shooting single actions to LEARN HOW TO GET THE GUN "BACK" TO A SAFE CONDITION IF YOU CHOOSE NOT TO SHOOT AFTER YOU HAVE COCKED THE HAMMER. That is obviously more than just letting the hammer down, since it will no longer have an empty chamber under the hammer. If you want to rely on the hammer's safety position, practice engaging it until it is second nature ... and practice letting the hammer down from full cock, pointing in a safe direction, with as minimal risk of dropping the hammer as is possible. I like to stick my thumb between the hammer and frame until the hammer is pretty low.
Get some snap caps and practice getting the empty chamber back under the hammer, too ... easy enough to figure out by putting just one snap cap in, or marking it a different color.