This rule of law is always based upon the proposition that the duty neglected must be a legal duty, and not a mere moral obligation. It must be a duty imposed by law or by contract, and the omission to perform the duty must be the immediate and direct cause of death.