General Part
Section 2.
Crime.
Chapter 8.
Circumstances excluding the criminality of the act.
Article 46. Justified risk.
1. Inflicting damage to the interests protected by criminal law is not considered a crime, when undertaking justified risk to achieve socially useful goals.
2. Risk is considered justified, if the mentioned goal could not be achieved without an action (or inaction) of risk, and when the risking person takes measures to prevent the danger to the interests protected by criminal law.
3. Risk is considered unjustified, if it obviously involves the death of third persons, or the threat of an ecological or public disaster.
Necessity - national proceedings
EDIT.