因禍得福

Idiom

 * 1) to benefit from one's own misfortune