Oh, it does happen, but it is exceedingly rare. In fact, you are more likely to be shot, or fatally shot if you have a gun, than if you do not
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2759797/
For those who consider the link TL;DR, here are the results and conclusions
1. Individuals who were in possession of a gun were 4.46 times more likely to be shot in an assault than those not in possession.
2. Individuals who were in possession of a gun were 4.23 times more likely to be fatally shot in an assault.
In assaults where the victim had at least some chance to resist
3. Individuals who were in possession of a gun were 5.45 times more likely to be shot.
When we only considered independent variables that most strongly affected our models, smaller but correspondingly significant adjusted odds ratios were noted. In these reduced models
4. Individuals who were in possession of a gun were 2.55 times more likely to be shot in an assault than those not in possession.
5. Individuals who were in possession of a gun were also 3.54 times more likely to be fatally shot in an assault.
In assaults where the victim had at least some chance to resist
6. Individuals who were in possession of a gun were 2.92 times more likely to be shot.