Bitcoins has such risks as a mathematician inventing a way to break public key crypto that would completely destroy it. Again if people build useable quantum computers, bitcoin is gone.
This is not completely true-- since only hashes of the public key are posted until funds are spent from an address, you need both (a quantum computer or a public key crypto break) and a major break in SHA256. If only one thing breaks, there may be enough time for bitcoin devs to make a fix. It'd be relatively easy to switch to a different address hashing algo, and the whole internet is going to hurt badly if public key crypto can't be fixed when quantum computers become common, so there's a lot of motivation to find a replacement.
(It's hard to imagine a break in SHA256 that's complete enough to affect mining-- weakenings are just the equivilent of running extra hardware.)
(It's also not completely false, as I still expect events like that to still cause a large temporary depression in bitcoin price.)
Pubkeys are protected by a dual construction of SHA-256 and RIPEMD-160, resulting in 80 bits of keyspace in a post-quantum world (assuming that existing quantum constructions can be extended into this dual-hash-of-ecdsa-key construction, which is not at all clear).
/nitpick