Here is a former sheriff's deputy that felt in danger from a dog:
http://www.nwherald.com/articles/2006/10/28/news/local/doc45431fd5e47ab748939925.txt Prosecutors said this:
Prosecutors said in their closing statements that a reasonable person would have contacted McHenry County Animal Control or police.
Here is a case where someone decided to kill thier pet because they felt thier pit bull was vicious, they all became felons :
http://azstarnet.com/sn/crime/163988
Here is one of a teen shooting a dog chasing his car and becoming a felon
http://www.freenewmexican.com/news/52804.html
Here is a guy that felt in danger from a growling dog smelling like a skunk and shot it with a a shotgun to become a felon
http://lists.envirolink.org/pipermail/ar-news/Week-of-Mon-20040209/019178.html
Here is one of a guy shooting and killing a dog fighting with his own dog, and then pointing the gun at the owner of the dog he shot who was likely very emotional. The prosecutor says he made them fight, and it is possible he is a jerk, but he shot a dog killing his dog, and then escorted the owner of the shot dog away at gunpoint and now faces 15 years and is guilty of 2 felonies.
http://www.usdoj.gov/usao/dc/Press_Releases/2006_Archives/Jan_2006/06016.html
Here is a guy that shot a police dog that wandered away from it's owners house and was on his property. He faces much more serious charges simply because it is considered a peace officer by law, and technicaly he can be charged with homicide if the prosecutor chose to.
http://www.ohio.com/mld/beaconjournal/news/state/16382937.htm
So while I didn't look long enough to find the perfect examples of shooting an animal, I just wanted to cite some quick references to people shooting dogs that all became felons in multiple states, and the dogs were either thier own animal , or on their property. So do not think you will not be facing charges even if you are in the right and have to shoot a dog. It is also at least one felony, even if it is a wild animal like a yote in many states Unless you have a license, and your not in a location where that license is not valid, like city limits, or even unincorporated places in CA.
Here is another guy charged with multiple counts when he had a dog on his property and was bitten by it securing it and decided to put it down on his own.
http://cbs4boston.com/topstories/local_story_102135323.html So even though the dog would be euthanized by the state for such action, him doing it himself makes him a felon, it was not self defense.
"Shooting a dog, either on or off of the owner's property unless the dog is in the act of attacking a human being or livestock." Cited in many places as a felony.