There is no danger in running out of fossil fuels. We have plenty for years and years to come, and LOTS of other energy sources that we're not even bothering to harness because fossil fuels are so cheap and plentiful.
The only reason we still use fossil fuels today is money. The very second it is no longer profitable to use fossil fuels, people will shift to one of the numerous other power sources. That may happen because the ability to produce and refine them gets outpaced by demand (a much more likely scenario than actually running out of them in the ground), or because social and political pressures make the industry less profitable.
Just follow the money. The second the money's not there, the energy industry will go where the money is.