I believe you said police (meaning more than one) carrying riot shields.  I guess there was a riot and lots of police?  Not the case in the situations described in the rest of your comments.  Every situation is different.  If a guy was coming at me with a hammer, and I had a hand gun.  I would shoot him too.  Hammers and unstable people are not a combination to be taken lightly.