Not as an act of self defense.
Brandishing in self defense is often an excellent thing to do that prevents the basic crime and does it without actually discharging the firearm, thereby avoiding any injury to anybody. Indeed, research by John Lott and others has shown mere brandishing without discharging the weapon prevents the basic crime in about 95% of the cases.