化險為夷

Idiom

 * 1) to head off a disaster