avert

To stop something bad from happening just in time.