(a) (1) If a nominee dies, declines the nomination, or is disqualified after the primary election but before a certificate of nomination is issued by the appropriate board with which candidates for that office must file a certificate of candidacy under § 5-302 of this title, the canvass and certification of the primary election results shall proceed as though the candidate had not died, declined the nomination, or been disqualified.
(2) If, following the canvass and certification, the individual who is certified as the nominee has died, declined the nomination, or been disqualified, a successor nominee may be named in the manner provided by law.
(b) (1) If a winning candidate dies, declines the office, or becomes disqualified after the general election but before the certification of the general election results, the canvass and certification shall proceed as though the candidate had not died, declined the office, or been disqualified.
(2) If, following the canvass and certification of the general election results, the individual who is declared elected has died, declined the office, or been disqualified, the office shall be declared vacant and filled in the manner provided by law.