Defending oneself with a gun against an attacking dog is a serious issue. Detroit has a police chief who openly supports using a gun in self-defense. Most of the time, it's a burglar who is shot.
Burglars take property or money, not cheeks, scalps or lives. An attacking dog may want your life. Using a gun to stop an attack could be not only reasonable but necessary in some circumstances.
In a case I am handling, the victim fought the pit bull for 10 minutes, with its teeth crushing her larynx for about 5 minutes. The man who tried to rescue her during those 5 minutes was hitting the dog with a piece of wood, but could not make it release her. He left and called 911.
She died. If he had a gun and was confident using it, she certainly would have lived. (The victim was Claudia Gallardo, and the preliminary hearing for the dog owner, Brian Hrenko, begins on April 24, 2014. The would-be rescuer of Ms. Gallardo was very brave, in my opinion, and nothing herein should be interpreted as criticism of him. People have been killed when trying to rescue pit bull victims. Based on what I know, he did all he could.)