It sounds almost like he was carrying a SA or a DA/SA pistol with the hammer cocked and the slide safety on. It wouldn't take much a a squeeze to dislocate the safety and make the gun ready to go off with the least jar particularly if he had modified the trigger.. One of the reason that leg wounds are common among police and security types.

A DAO pistol should not have gone off like that unless he had really, really modified the trigger.