Multiple lessons here. Weapons must be secured in a rapid-opening finger-touch-code locking device. Another lesson; handguns are wounding weapons that sometimes kill. The best home defense weapon should be either a shotgun or center-fire rifle (if living in dense population / apartment, rifle rounds over penetrate, so only a shotgun would be appropriate).
If you use a shotgun in the correct distance then you would have to miss your target on purpose to not kill him.