Before anyone gets the wrong idea, I don't advocate just pulling out your pistol and blasting holes in the varmint that comes at Fido within city limits. Though I don't recommend getting between your dog and another animal. I've picked up plenty of people who needed lots of stitches for that reason when I worked on the big orange and white bus.
I assumed that since we were talking about wild animals, we were talking about out in the country, though with encroachment on wild lands by cities the two are not mutually exclusive (I've seen wild bob cats running loose in Gainesville, Florida, and they weren't rabid. The city just butts up to the woods in certain areas and it's easier to scavenge out of garbage cans and steal pet food than hunt.).
I now live in a city and would only use my weapon if that was my only choice, and I knew darn well where the bullet is going after it goes through the attacking wild animal/vicious dog that attacks my dog.
Also, remember, in the eyes of the law I have a bit more right to defend my dog than most people because she's a service dog. I can not only defend her from the neighbor's uncontrolled pet, I can have the neighbor arrested on a third degree felony if they allow their vicious animal to attack my Great Dane even through neglect rather than malice. Service dogs are not pets under the law and have special protections in place in Florida because of their function.