There's not much of correlation between home prices and stock market, just buy whatever fit your need.
However, it depends on what kind of disaster that cause the stock market to crash. If it's just China bubble burst, no big deal. But if it's because a killer asteroid heading toward earth, than I don't think anyone is buying a home.