Question: what happens if a presidential candidate dies right before the election?
Answer: President-elect succession If the apparent winner of the general election dies before the Electoral College votes in December the electors would likely be expected to endorse whatever new nominee their national party selects as a replacement.