That is know as 'ademption'. That is the gift is revoked if it is disposed of.
But it can also depend on the wording.
eg. If you say
a) I leave 100 WBC shares to Redwing
or
b) I leave my 100 shares to Redwing.
for a) If I have 100 WBC shares and I sell them before my death, then...