I do not think the salary would count because there would be no contract. The contract is considered null and void at the time of death. The player no longer exists. The deceased player would not fit into any of the categories identified in the agreement (active roster, injured roster, non roster, etc.).
Per the CBA 50.5(d)(i)(b)
From the day following the last day of Training Camp until and including June 30 of each League Year, "Averaged Club Salary" for each Club shall be calculated as the sum of the following amounts:
(1) The Averaged Amount of the Player Salary and Bonuses for that League Year for each Player on the Club's Active Roster, Injured Reserve, Injured Non Roster and Non Roster; plus
(2) All amounts earned in that League Year by the Players on account of Deferred Salary and Deferred Bonuses (in accordance with Section 50.2(a) and Section 50.2(b), respectively); plus
(3) All Ordinary Course Buyout Amounts paid in that League Year (in accordance with Section 50.9(i));plus
(4) To the extent not counted in (1) above, any amount offered in that League Year by the Club in an Offer Sheet to a Restricted Free Agent from the date of such Offer Sheet until the earliest of the following:
(A) the Restricted Free Agent signs an SPC with the Club; or (B) the Restricted Free Agent signs an SPC with another Club; plus
(5) All Player Salary and Bonuses earned in a League Year by a Player who is in the second or later year of a multi-year SPC which was signed when the Player was age 35 or older (as of June 30 prior to the League Year in which the SPC is to be effective), but which Player is not on the Club's Active Roster, Injured Reserve, Injured Non Roster or Non Roster, and regardless of whether, or where, the Player is playing, except to the extent the Player is playing under his SPC in the minor leagues, in which case only the Player Salary and Bonuses in excess of $100,000 shall count towards the calculation of Averaged Club Salary;