Good topic. It's hard to give clear answers to these questions because every case is different, and each case has a different set of circumstances. Regarding the OP's original question, based on what he described, there is no crime being committed. However, when you add other people, and confrontation, to the equation, then you have to analyze the whole situation from start to finish.
Here's my 2 cents, fwiw. Keep in mind, when you talk about committing a crime, there are 2 things that need to be investigated and/or proven, the Act and the Intent; Actus reus and Mens rea. When LE investigates, they look What criminal act was committed, and what was the Intent of the actors involved.
My understanding is that revealing your weapon in an intimidating manner is threatening, and is a crime of some sort -- which sort depends on the specifics. However, if you do it because you have a reasonable fear, then you're threatening in self-defense. That means that while you have committed a crime, the law explicitly states that you have a valid defense.
Sorry for the confusion. To answer your question, No, you would be in violation of any law 'if in the act of self-defense".
Technically pointing a gun at a bad guy with a knife running towards you is Aggravated Assault,...
It's actually Incorrect to say that you've committed a crime, or 'technically' committed a crime, by simply drawing or showing a gun, or even shooting someone, during a confrontation. What was your Intent?
If LE can't show/prove Intent, (mens rea, acting with criminal intent) there's No crime and they wont pursue charges. Neither will the County Attorney or D.A's office. If by chance you do get charged, then (in an Ideal world....) the state, county city would have to prove the Act And Intent in court. Thats where you would present your facts about why your actions were done in 'self defense'.
Probably the most common mistake people make when it comes to this particular topic, or code 76-10-506, is they Escalate the problem instead of avoiding the confrontation, or area, in the first place. ie; If some guy wants to confront you during a road rage, dont flash your weapon, or pull over and be a mutual role player. Call the police or drive to a police station.
ie; If you're walking down a sidewalk at night and you're walking towards a group of 'scary looking people', find another way to go, or cross the street. IF you decide to walk into the crowd, donâ€™t display your gun like the you're the 'Man', just be ready in case things go Really bad.
Just remember, A gun should never be shown Hoping to Scare possible Threats away. Its a tool that kills. Take it out only when you need to stop someone from killing you.