You’re not really voting for a candidate in a Primary, you’re voting for party delegates who pledge to vote for your candidate.
If the candidate withdraws from the race prior to the convention, his/her delegates are released to vote as they please.
No, I understand that. What if AFTER the convention, something happens to the candidate?