Indian Penal Code, 1860
If in the exercise of the right of private defense against an assault which reasonably causes the apprehension of death, the defender be so situated that he cannot effectually exercise that right without risk of harm to an innocent person, his right of private defense extends to the running of that risk.
A. is attacked by a mob who attempt to murder him. He cannot effectually exercise his right of private defense without firing on the mob, and he cannot fire without risk of harming young children who are mingled with the mob. A commits no offence if by so firing he harms any of the children.