No it is not, but your conduct must be within the guidelines of what constitutes self-defense under the set of circumstances leading to the fatality. You must have reasonably believed you were in imminent danger of death or great bodily injury and you used no more force than necessary to defend yourself. If the attacker was engaged in a “forcible or ferocious crime’ such as rape or robbery or was otherwise armed with a deadly weapon and was attacking you, then you can use deadly force to defend yourself.