This question has been asked frequently, ever since Donald Trump decided to make enemies of a Gold Star family as well as prominent Republicans. The last week has seen a near revolt against Trump. Each day Republicans have to disavow his latest remarks, and some are openly declaring their support for his opponent. The uproar has reached the point where some are wondering: what would happen if Trump were to resign under pressure or Governor Mike Pence, the Republican vice presidential candidate, were to resign in protest?

Both parties have procedures for filling vacancies on the ticket. The Democrats had to choose a new vice presidential candidate after their 1972 convention, when Senator Tom Eagleton resigned after it came out that he had suffered serious mental illness in the past. The Democratic National Committee met in special session on August 8, 1972 just three days after George McGovern had chosen Sargent Shriver to replace Eagleton.

Here’s the legal framework.

Re-convening a convention is impractical—the National Committees decide.

If the presidential or vice presidential candidacy of the Republican Party becomes vacant “by reason of death, declination, or otherwise” that office can be filled by the Republican National Committee or the Republican National Committee can reconvene the national convention. This process is laid out in Rule No. 9 of the Rules of the Republican Party. The Democrats have a similar provision in Article Two of their party rules. A major difference between the parties is how the committees are composed. Whereas the Democrats award national committee members according to size, and thus big states always have more votes than small states, the RNC is composed of 3 members per state—a system that gives California the same weight as Wyoming. Therefore, if a meeting to fill a vacancy on the presidential ticket is called, the Republican National Committee members “representing any state shall be entitled to cast the same number of votes as said state was entitled to cast at the national convention.” So when voting for a presidential or vice presidential replacement, the RNC takes into account the different sizes of states.

New candidates mean new ballots.

Related Content FixGov Bloomberg’s Clinton endorsement signals a big business problem for Trump and the GOP FixGov 5 ways Mike Pence helps the Trump ticket…and 4 ways he doesn’t FixGov Obvious differences between Trump and Pence could derail the ticket

One of the problems that filling a vacancy would create would be changing the name of the candidate for president or vice president on the ballots in all the states. Obviously the earlier the replacement was made the better, but a replacement made closer to the election would likely not be a problem in the states that use some form of computerized voting and more of a problem in states that use paper ballots. But even if the vacancy and replacement came too late in the game to change many ballots, it wouldn’t change who the actual candidates are. Because…

Electors, not voters, make the final call.

We often forget that we do not vote directly for the man or woman who is the presidential candidate, we vote for “electors” to the Electoral College. Surprise, surprise—these are real people. They meet on the Monday after the second Tuesday in December in their state legislatures to cast ballots and sign their names to a paper which is sent on to the President of the Senate (the sitting Vice President of the United States.) The assumption is that these people will vote with the political party that nominated them. Although there have been examples throughout history of “faithless electors” by and large the electors are very loyal party people. Thus the electors would vote for the new nominee even if the votes cast are for the old one whose name is on the ballot.

So there is a fairly straightforward process for replacing nominees after the convention. Obviously the parties had to anticipate the possibility that a candidate could die or somehow become disabled in between the convention and the election. (Presidential candidates are usually not young.)

However, there is no process for is revoking a nomination. And that’s because, in both parties, the quadrennial convention is the highest rule making authority. Actions taken by the two national committees in between the conventions are subject to actions taken by the parties in convention.

Unfortunately for those Republicans wringing their hands right now, there is no way to undo what they did in Cleveland.

Elaine C. Kamarck is a Senior Fellow at the Brookings Institution and author of Primary Politics: Everything You Need to Know about How America Nominates Its Presidential Candidates. She is a superdelegate to the Democratic convention.