When a person reasonably apprehends that another intends to attack him for the purpose of killing him or doing him serious bodily harm, then such person has a right to arm himself for his own necessary self-protection, and in such case, no inference of malice can be drawn from the fact that he prepared for it.