What you failed to do is to do a brass check. I do it everytime I pick up any pistol, esp if I'm going to put it on my hip or pocket carry.
Never assume anything. If you assume it was unloaded, then it might be loaded and vice versa. It would suck to find out the hard way! i.e. if you really had to defend your life and your gun is empty