I always wondered what would happen if a party's nominee for President died before the election. Is there even a protocol to name an alternate? I know in Senate elections, there isn't in most states.
When voters cast their votes in November, they are not actually casting votes for a specific person. Instead, they are casting votes for electors, persons chosen by the candidates' parties to attend a gathering of all electors in each state capital, where they cast the votes that officially elect a president.
If a presidential candidate dies after the party convention and before the election, particularly before ballots are printed, the party can select a new person to represent the party on the ticket. The choice will depend on the party's own rules. As the election nears, the situation gets more sticky, because elections take time to plan. Practically speaking, ballots must be printed, and if there is not enough time to do that, the election can still go on, though with the name of a now-dead candidate on the ballot - state law should dictate how such ballots would be handled. Vermont law (17 VSC 2475), for example, states that new ballots will be printed - but if the death occurs near enough to Election Day, it may not be possible to print new ballots.
While near-election death might be a problem for a Senator or a judge, where the voters are electing a specific person, in the case of the presidential election, the buffer of the electoral college would allow the election to continue.