Crimes that consist of producing a result shall only be considered committed by omission when the failure to prevent said result, by violating a special legal duty of the perpetrator, is equivalent, according to the meaning of the law, to causing it. For this purpose, omission shall be equated to action:
a) When there is a specific legal or contractual obligation to act.
b) When the person who omits to act has created a risk to the legally protected interest through a prior action or omission.