Mankind, though stupid, is pretty good at fixing its mistakes at the very last moment.
Though I am reminded of the old story about the greatest batter of all time. He took his stance as the first pitch was thrown. The batter smiled and didn't swing. STRIKE ONE. The second pitch he did the same. STRIKE TWO. Now, with the game on the line, he kept his cool. The pitcher threw, the batter swung and WHACK! Strike three. You're [email protected]
The batter waited for that third pitch "knowing" that he could hit the home run. Unfortunately, even the best are flawed.
The question is about the end of the world. My response is about the start of a new one. If the world truly does come to an end, mankind will find a way to survive. And we will find another home or another way of living. Read Farnham's Freehold
by Robert A Heinlein. We will always find a way.