While attempting to remove his firearm, an officer accidentally discharged the weapon.