Suppose Fred is in danger of death or injury, and the most direct way to avoid that fate involves stealing or damaging property belonging to Ernie, an uninvolved person.
Fred is being pursued by a would-be assailant on foot, and finds Ernie's bicycle unlocked. Fred can steal the bicycle to enable a quick escape from the pursuer.
Fred is in a car whose brakes stop working. The most direct way to avoid crashing into something hard is to intentionally crash into Ernie's fruit stand.
Is this action by Fred allowed?
Does Fred have to compensate Ernie afterward?
Does the likelihood or not of actual death to Fred if he doesn't steal or damage matter to 1 and 2? What if the worst possible consequence is just injury?
Does it matter how Fred got into the dangerous situation, e.g. through pure accident, his own negligence, someone else's negligence, or someone else's malice?