There is not usually a trial when a law enforcement officer shoots someone in the line of duty if that person is presenting a threat. If someone broke out your window and was climbing through the prosecutor would probably not charge you, either.
There is always an investigation. Always. And a trial if there is any doubt at all.