Im pretty sure they have a succession plan, when he dies another spiritual leader will take his place. So I dont think this will affect anything.
UPDATE (Wednesday Oct 14th): According to a bulletin from the Greens (Moussavi/Karroubi et al), there are widespread rumors in the Tehran Bazaar that Khamenei has died. The Greens say they cannot confirm it, but that there is an “abnormal atmosphere” in the streets, which almost certainly means there are more security people than usual.