https://github.com/bitcoin/bitcoin/pull/2410
Backup your wallet before and after. Try to recover old backups of your wallet.
The link to the binary there is now dead. Still lost trying to recover this wallet... it's just downright insane that Bitcoin doesn't use a standard, human-readable file format for the all-important wallet.dat file. >.<
Sure is ridiculous. This was quite a while ago, but I remember
* Backing up my ~/.bitcoin (~/Library/Application\ Support/Bitcoin on OSX)
* opening bitcoin-qt
* quitting it
* copy the wallet.dat from the backup to the new ~/.bitcoin
* Start bitcoin-qt again, let it download the block chain
* Moving my funds to Electrum